#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n;
  long long ans = 0;
  map<int, int> num;
  cin >> n;
  int *x = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> x[i];
    num[x[i]]++;
  }
  for (int i = (-10); i <= -1; i++) {
    ans += (long long)num[i] * num[-i];
  }
  ans += (long long)(num[0] - 1) * (num[0]) / 2;
  cout << ans << endl;
}
