#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int64_t> tn(11);
  vector<int64_t> tp(11);
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a < 0)
      tn[abs(a)] += 1;
    else
      tp[a] += 1;
  }
  int64_t ans = 0;
  if (tp[0] != 0) ans += (tp[0] * (tp[0] - 1)) / 2LL;
  for (int i = 1; i <= 10; i++) {
    ans += tn[i] * tp[i];
  }
  cout << ans;
}
