#include <bits/stdc++.h>
using namespace std;
template <class T>
T sqr(T a) {
  return (a) * (a);
}
template <class T>
T abs(T a) {
  return (a < 0) ? -(a) : (a);
}
const double Pi = acos(-1.0);
const double eps = 1e-9;
const int INF = 101e7;
bool big(char a) { return (a >= 'A' && a <= 'Z'); }
int main() {
  int n;
  long long p[12], m[12], z;
  scanf("%d\n", &n);
  long long a;
  long long ans;
  for (int i = 0, _n = (11) - 1; i <= _n; i++) {
    p[i] = 0;
    m[i] = 0;
  }
  z = 0;
  for (int i = 0, _n = (n)-1; i <= _n; i++) {
    cin >> a;
    if (a > 0)
      p[a]++;
    else if (a < 0)
      m[-a]++;
    else
      z++;
  }
  ans = 0;
  for (int i = (1), _b = (10); i <= _b; i++) {
    ans += (long long)p[i] * m[i];
  }
  if (z > 0) ans += (long long)(z * (z - 1)) / 2;
  cout << ans;
  return 0;
}
