#K82472. Maximum Teams with Same Members

    ID: 35983 Type: Default 1000ms 256MiB

Maximum Teams with Same Members

Maximum Teams with Same Members

You are given an integer nn representing the number of teams and a list of nn integers where each integer denotes the number of members in a team. Your task is to determine the maximum number of teams that have the same number of members. In other words, find the frequency of the most common team size.

For example, if there are 5 teams with team sizes: 3, 3, 3, 2, 2, the answer is 3 because the team size 3 appears three times.

Input is provided via standard input and output should be sent to standard output.

inputFormat

The first line contains an integer nn (1n1051 \le n \le 10^5) representing the number of teams. The second line contains nn space-separated integers representing the team sizes.

outputFormat

Output a single integer representing the maximum frequency of any team size.## sample

5
3 3 3 2 2
3