#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, a;
  double b[21], sum = 0;
  scanf("%d", &n);
  memset(b, 0, sizeof(b));
  for (i = 0; i < n; i++) {
    scanf("%d", &a);
    b[a + 10]++;
  }
  for (i = 0; i < 10; i++) sum += b[i] * b[20 - i];
  sum += b[10] * (b[10] - 1) / 2;
  printf("%.0lf\n", sum);
  return 0;
}
