#include <bits/stdc++.h>
int main() {
  long long int sum = 0, i, n, k;
  scanf("%lld", &n);
  long long int arr[21];
  for (i = 0; i < 21; i++) {
    arr[i] = 0;
  }
  for (i = 0; i < n; i++) {
    scanf("%lld", &k);
    arr[k + 10]++;
  }
  for (i = 0; i < 10; i++) {
    sum = sum + arr[i] * arr[20 - i];
  }
  sum = sum + ((arr[10]) * (arr[10] - 1)) / 2;
  printf("%lld\n", sum);
  return 0;
}
