#include <bits/stdc++.h>
using namespace std;
int n, x;
long long a[22];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &x);
    a[x + 10]++;
  }
  long long res = (a[10] * (a[10] - 1)) / 2;
  for (int i = 1; i <= 10; ++i) res += a[i + 10] * a[10 - i];
  cout << res;
  return 0;
}
