Problem Description

Read n keys with integer values. Count how many unordered pairs of keys have same value. Output the number.

Input Format

First line n. Next n lines: key value.

Output Format

One integer pairCount.

Sample Test Case

Input:
5 a 1 b 1 c 2 d 2 e 2
Output:
4

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next