n = gets.chomp.to_i
a = []
n.times do |i|
  a[i] = gets.chomp.to_i
end
cnt = 0
while a != []
  i = 0
  m = a[0]
  cnt += 1
  a.delete_at(0)
  while i < a.length
    if a[i] > m
      m = a[i]
      a.delete_at(i)
    else
      i += 1
    end
  end
end
puts cnt
