#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int b[21] = {0};
  for (int i = 0; i < n; i++) b[a[i] + 10]++;
  long long int ans = 0;
  for (int i = 0; i < 10; i++) ans += (b[i] * b[20 - i]);
  long long int t = b[10] - 1;
  long long int f = 0;
  while (t > 0) {
    f = f + t;
    t--;
  }
  ans += f;
  cout << ans;
}
