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