Problem1006--Find the sum

1006: Find the sum

[Creator : ]
Time Limit : 2.000 sec  Memory Limit : 128 MiB

Description

Given N integers Xi, (all are distinct) , please find out how many integer in the list which is the sum of another two integers in the list. 

Input

The first line contains integer N
The second line contains N integers
(1 <= N <= 10,000, 1<= Xi <= 100000000 ) 

Output

One integer which is the number of Xi who is the sum of another two integers in the list

Sample Input Copy

5
4 5 10 1 3

Sample Output Copy

2

HINT

In the example: 1+3 = 4 and 1+4=5; therefore, the answer is 2

Source/Category