CodeMentor.
Ask AIProblemsLearnC++TCSCore CSHRProgress
0Lv 1
ProblemsHackerRank Warmup

Sock Merchant

Easy
HackerRank
11/12
EasyHackerRank Warmup

Sock Merchant

Count frequencies of each color. Each pair is freq divided by 2. Sum the pairs.

Examples

Example 1

Input

9
10 20 20 10 10 30 50 10 20

Output

3

Stuck? Take a nudge

C++17Autosaves