#include <bits/stdc++.h>   using namespace std;   map<long long, long long> m;   long long n, p;   int main() {     cin >> n;     while (cin >> n) m[n]++;     for (n = 1; n < 11; n++) p += m[n] * m[n * -1];     cout << p + m[0] * (m[0] - 1) / 2;   }   