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