#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9) + 100;
const int mod = (int)(1e9) + 7;
const int N = (int)(1e5) + 100;
long long n, t[N], pos[20], neg[20];
long long ans = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  long long z = 0;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    if (t[i] > 0)
      pos[t[i]]++;
    else if (t[i] < 0)
      neg[abs(t[i])]++;
    else
      z++;
  }
  ans += z * 1ll * (z - 1) / 2;
  for (int i = 1; i <= 10; i++) {
    if (pos[i] == 0 || neg[i] == 0)
      continue;
    else if (pos[i] > 0 && neg[i] > 0) {
      long long cur = pos[i] + neg[i];
      cur = cur * 1ll * (cur - 1) / 2;
      cur -=
          (pos[i] * 1ll * (pos[i] - 1) / 2 + neg[i] * 1ll * (neg[i] - 1) / 2);
      ans += cur;
    }
  }
  cout << ans;
  return 0;
}
