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