#/usr/bin/env perl use strict; use warnings; $_ = <>; my $k = <>; chomp $k; my $count = 1; print "1\n"; while (defined(my $m = <>)) { chomp $m; if ($k < $m) { $count++; } print "$count\n"; }