n = gets.to_i
input = []
n.times do
    input.push(gets.to_i)
end

next_index = 0
color = 0
while next_index
    color += 1
    val = input[next_index]
    input[next_index] = nil
    start = next_index + 1
    next_index = nil
    start.upto(n - 1) do |i|
        next if !input[i]
        if val >= input[i]
            next_index = i if !next_index
            next
        end
        input[i] = nil
    end
end
puts color