Back
Close

Uluqbek and Socks

Statement
Uluqbek is a Socks seller . In his warehouse hi has N socks , his socks mixed . He wants more pairs of socks. Help him !

Input description
given N and N integer

Output description
maximum pair of socks

Constraints
1 <= N <= 1000 1 <= Ni <= 1000

Game modes

Test cases
Test 1 Test
Input
6 1 2 3 3 2 1
Output
3

Validator 1 Validator
Input
5 1 5 3 2 5
Output
1

Test 2 Test
Input
11 1 5 8 9 4 5 1 8 4 6 7
Output
4

Validator 2 Validator
Input
1 2
Output
0

Test 3 Test
Input
2 1 1
Output
1

Validator 3 Validator
Input
5 1 2 4 2 1
Output
2

Test 4 Test
Input
15 1 2 5 6 1 2 5 6 8 8 1 1 2 5 2
Output
7

Validator 4 Validator
Input
8 1 2 5 6 1 2 5 6
Output
4

Solution language

Solution

Stub generator input