#include <bits/stdc++.h>
int buc[11][2];
int tmp;
int n;
long long ans;
long long pluss;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &tmp);
    if (tmp >= 0) {
      buc[tmp][0]++;
    } else {
      buc[-tmp][1]++;
    }
  }
  pluss = (long long)buc[0][0] * buc[0][0];
  pluss = pluss - buc[0][0];
  pluss = (long long)pluss / 2;
  ans = pluss;
  for (int i = 1; i <= 10; i++) {
    pluss = (long long)buc[i][0] * buc[i][1];
    ans = ans + pluss;
  }
  printf("%I64d\n", ans);
  return 0;
}
