#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 * 1000 + 5;
int n, t[11][2];
long long javab = 0;
int main() {
  int x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x < 0) {
      t[-1 * x][1]++;
      continue;
    }
    t[x][0]++;
  }
  javab += (long long)t[0][0] * (long long)(t[0][0] - 1) / 2;
  for (int i = 1; i <= 10; i++)
    javab += (long long)t[i][0] * (long long)t[i][1];
  cout << (long long)javab << endl;
  return 0;
}
