#include <bits/stdc++.h>
using namespace std;
int tmp[100];
int *cnt = tmp + 50;
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    memset(tmp, 0, sizeof tmp);
    for (int i = 0; i < n; i++) {
      int x;
      scanf("%d", &x);
      ++cnt[x];
    }
    long long ret = 0;
    for (int j = 1; j <= 10; j++) {
      ret += (long long)cnt[j] * cnt[-j];
    }
    ret += (long long)cnt[0] * (cnt[0] - 1) / 2;
    cout << ret << endl;
  }
}
