#include <bits/stdc++.h>
using namespace std;
int di[] = {0, 1, 0, -1};
int dj[] = {1, 0, -1, 0};
int dik[] = {1, 1, 2, 2, -1, -1, -2, -2};
int djk[] = {2, -2, 1, -1, -2, 2, -1, 1};
long long gcd(long long x, long long y) { return !y ? x : gcd(y, x % y); }
int main() {
  long long n, tmp, ans;
  vector<long long> x(11), y(11);
  scanf("%I64d", &n);
  for (int i = 0; i < int(n); i++) {
    scanf("%I64d", &tmp);
    tmp >= 0 ? x[tmp]++ : y[abs(tmp)]++;
  }
  ans = x[0] * (x[0] - 1) / 2;
  for (int i = 1; i < 11; i++)
    if (x[i] && y[i]) ans += x[i] * y[i];
  printf("%I64d\n", ans);
  return 0;
}
