N = gets.chomp.to_i
A = []
N.times do |i|
    A << [gets.chomp.to_i, i]
end
A.sort!
ans = 0
while !A.empty?
    a, i = A.shift
    while i_delete = A.find_index{|aa, ii| a < aa && i < ii}
        a, i = A.delete_at(i_delete)
    end
    ans += 1
end
puts ans