#include <bits/stdc++.h>
const int inf = 1000000007;
using namespace std;
int i, j, k, m, n, t;
long long a[21], ans;
int main() {
  cin >> n;
  while (n--) {
    cin >> i;
    a[i + 10]++;
  }
  for (i = 0; i < 10; i++) ans += a[i] * a[20 - i];
  ans += (a[10] - 1) * a[10] / 2;
  cout << ans << endl;
  return 0;
}
