#include <bits/stdc++.h>
using namespace std;
int a[30];
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    memset(a, 0, sizeof(a));
    for (int i = 0; i < n; i++) {
      int u;
      scanf("%d", &u);
      a[u + 10]++;
    }
    long long ans = 0;
    for (int i = -10; i < 0; i++) {
      ans += 1LL * a[i + 10] * a[10 + -i];
    }
    ans += 1LL * a[10] * (a[10] - 1) / 2;
    cout << ans << endl;
  }
  return 0;
}
