#include <bits/stdc++.h>
using namespace std;
long long flag[30];
int main() {
  int n;
  while (scanf("%d", &n) > 0) {
    memset(flag, 0, sizeof(flag));
    for (int i = 1; i <= n; i++) {
      int x;
      scanf("%d", &x);
      flag[x + 11] += (1ll);
    }
    long long res = 0;
    for (int i = 1; i <= 10; i++) res += (flag[-i + 11] * flag[i + 11]);
    res += (flag[11] * (flag[11] - 1)) / (2ll);
    printf("%I64d\n", res);
  }
}
