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