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