Itsy's Triangles

Limits 1s, 512 MB

Itsy went for a walk and found several sticks in the park. She is wondering how many of these sticks can she use to make right angled triangles.

The sticks are all straight and of integer lengths. Yes, amazing things happen in the world of problem solving if you want to believe it.

You will be given the lengths of the sticks.

You will have to determine the number of sticks from which you can take three sticks at a time to make a right angled triangle.

A right angled triangle has one angle that is 90°90\degree.

You can reuse the same stick in different triangles, but you will count the stick only once in your result.

Input

The first line contains an integer NN (3N1003 \le N \le 100). NN is the number of sticks Itsy has collected.

The following line contains NN integers. Each of these integers, LiL_i (1Li1001 \le L_i \le 100), represents the length of a stick that Itsy has collected.

Output

Print the number of sticks Itsy can use to make right-angled triangles.

Sample

InputOutput
5
2 3 4 3 5
4