#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  long long v[25];
  memset(v, 0, sizeof(v));
  for (int i = 0; i < n; i++) {
    int t;
    scanf("%d", &t);
    v[t + 10]++;
  }
  long long cc = 0;
  for (int i = 0; i < 10; i++) cc += (v[i] * v[20 - i]);
  cc += v[10] * (v[10] - 1) / 2;
  printf("%I64d\n", cc);
  return 0;
}
