#include <bits/stdc++.h>
using namespace std;
int all[22];
int n;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  int x;
  while (n--) {
    cin >> x;
    ++all[x + 10];
  }
  long long ans = ((long long)all[10] * (all[10] - 1)) / 2;
  for (int i = -10; i < 0; ++i)
    ans += ((long long)all[i + 10] * all[abs(i) + 10]);
  cout << ans << "\n";
  return 0;
}
