program B085
    implicit none
    integer(8) :: N
    integer(8), allocatable, dimension(:) :: d
    integer(8) :: i, max, sum

    read(5,*) N
    allocate(d(N))
    do i = 1, N
        read(5,*) d(i)
    end do

    sum = 0
    max = maxval(d)
    do while (max /= 0)
        sum = sum + 1
        do i = 1, N
            if (max == d(i)) then
                d(i) = 0
            end if
        end do
        
        max = maxval(d)
    end  do


    write(6,*) sum




end program B085