#include <bits/stdc++.h>
using namespace std;
int pos[11];
int neg[11];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int v;
    cin >> v;
    if (v < 0)
      neg[-v]++;
    else
      pos[v]++;
  }
  uint64_t ans = (uint64_t)pos[0] * (pos[0] - 1) / 2;
  for (int i = 1; i <= 10; ++i) ans += (uint64_t)pos[i] * neg[i];
  cout << ans << "\n";
  return 0;
}
