#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, res = 0;
  vector<long long> cnt(30, 0);
  cin >> n;
  long long tmp;
  for (long long i = 0; i < n; ++i) {
    cin >> tmp;
    tmp += 10;
    cnt[tmp]++;
  }
  for (long long i = 0; i < 10; ++i) {
    res += cnt[i] * cnt[20 - i];
  }
  res += ((cnt[10] * (cnt[10] - 1)) / 2);
  cout << res;
}
