#include <bits/stdc++.h>
int n, a[11], b[11];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int t;
    scanf("%d", &t);
    if (t >= 0) {
      a[t]++;
    } else {
      b[-t]++;
    }
  }
  long long ans = (long long)a[0] * (a[0] - 1) / 2;
  for (int i = 1; i <= 10; ++i) {
    ans += (long long)a[i] * b[i];
  }
  printf("%I64d\n", ans);
}
