#C5249. Counting Distinct Duplicate Integers

    ID: 48877 Type: Default 1000ms 256MiB

Counting Distinct Duplicate Integers

Counting Distinct Duplicate Integers

Given a list of integers, your task is to count the number of distinct integers that appear more than once. In other words, you need to determine how many unique numbers have a frequency greater than one in the list.

Input Format: The first line of input contains an integer \(n\) representing the number of elements in the list. The second line contains \(n\) space-separated integers. If \(n = 0\), the second line will be empty.

Output Format: Output a single integer which is the count of distinct integers that appear more than once.

Example:

Input:
6
1 2 3 1 2 2

Output: 2

</p>

inputFormat

The input consists of two lines. The first line contains a single integer \(n\) which is the number of integers. The second line contains \(n\) space-separated integers. If \(n = 0\), the second line will be empty.

outputFormat

Output a single integer representing the number of distinct integers that appear more than once in the given list.

## sample
5
1 2 3 4 5
0