Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

B. Opposites Attract

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputEverybody knows that opposites attract. That is the key principle of the "Perfect Matching" dating agency. The "Perfect Matching" matchmakers have classified each registered customer by his interests and assigned to the *i*-th client number *t*_{i} ( - 10 ≤ *t*_{i} ≤ 10). Of course, one number can be assigned to any number of customers.

"Perfect Matching" wants to advertise its services and publish the number of opposite couples, that is, the couples who have opposite values of *t*. Each couple consists of exactly two clients. The customer can be included in a couple an arbitrary number of times. Help the agency and write the program that will find the sought number by the given sequence *t*_{1}, *t*_{2}, ..., *t*_{n}. For example, if *t* = (1, - 1, 1, - 1), then any two elements *t*_{i} and *t*_{j} form a couple if *i* and *j* have different parity. Consequently, in this case the sought number equals 4.

Of course, a client can't form a couple with him/herself.

Input

The first line of the input data contains an integer *n* (1 ≤ *n* ≤ 10^{5}) which represents the number of registered clients of the "Couple Matching". The second line contains a sequence of integers *t*_{1}, *t*_{2}, ..., *t*_{n} ( - 10 ≤ *t*_{i} ≤ 10), *t*_{i} — is the parameter of the *i*-th customer that has been assigned to the customer by the result of the analysis of his interests.

Output

Print the number of couples of customs with opposite *t*. The opposite number for *x* is number - *x* (0 is opposite to itself). Couples that only differ in the clients' order are considered the same.

Note that the answer to the problem can be large enough, so you must use the 64-bit integer type for calculations. Please, do not use the %lld specificator to read or write 64-bit integers in С++. It is preferred to use cin, cout streams or the %I64d specificator.

Examples

Input

5

-3 3 0 0 3

Output

3

Input

3

0 0 0

Output

3

Note

In the first sample the couples of opposite clients are: (1,2), (1,5) и (3,4).

In the second sample any couple of clients is opposite.

Codeforces (c) Copyright 2010-2017 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Nov/20/2017 14:44:25 (c2).

Desktop version, switch to mobile version.

User lists

Name |
---|