#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30, N = 1002;
int ax[] = {0, 1, -1, 0, 0};
int ay[] = {0, 0, 0, -1, 1};
int main() {
  int n, a, i, j;
  long long sum = 0, t[50] = {};
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a;
    t[a + 20]++;
  }
  for (i = -10; i < 0; i++) sum += (t[i + 20] * t[-i + 20]);
  sum += (t[20] - 1) * (t[20]) / 2;
  cout << sum;
  return 0;
}
