LearnPy Hub
← Tuples & Sets problems
Hard

Distinct Pairs

Read a list of integers and print how many distinct unordered pairs of different values (a, b) with a + b = 0 can be formed from the values present.

Input

One line of integers.

Output

A count.

Sample 1

Input
1 -1 2 -2 2 3
Output
2

Sample 2

Input
0 0 0
Output
0
solution.py
Output appears here
Distinct Pairs · Python practice problem · LearnPy Hub