#include <bits/stdc++.h>
using namespace std;
long long x = 0, a[40], n = 0, ans = 0;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    a[x + 10]++;
  }
  for (int i = 0; i < 10; i++) {
    ans += a[i] * a[20 - i];
  }
  ans += (a[10] * (a[10] - 1)) / 2;
  cout << ans;
  return 0;
}
