#include <bits/stdc++.h>
using namespace std;
long long t[11];
long long s[11];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    if (x >= 0) t[x]++;
    if (x < 0) s[-x]++;
  }
  long long sol = t[0] * (t[0] - 1) / 2;
  for (int i = 1; i <= 10; i++) sol += (long long)t[i] * s[i];
  printf("%lld\n", sol);
  return 0;
}
