#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int a;
long long int b[60];
int n;
int main() {
  unsigned long long int ans = 0;
  scanf("%d", &n);
  memset(b, 0, sizeof b);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    if (a < 0)
      b[a + 30]++;
    else
      b[a]++;
  }
  if (b[0] > 0)
    for (int j = b[0] - 1; j > 0; j--) ans += j;
  for (int i = 1; i <= 10; i++) {
    ans += b[i] * b[30 - i];
  }
  printf("%llu\n", ans);
  return 0;
}
