N = gets.to_i K, *A = N.times.map{ gets.to_i } ANS = [1] A.inject(1) do |pos, v| (v > K ? pos + 1 : pos).tap do |i| ANS << i end end puts ANS