#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, y, r = 0, r1 = 3;
  scanf("%I64d", &x);
  bool b = 0;
  map<long long, long long> m;
  for (long long i = -10; i < 11; i++) m[i] = 0;
  for (long long i = 0; i < x; i++) {
    cin >> y;
    m[y]++;
  }
  for (long long i = 1; i < 11; i++) {
    r += m[i] * m[i * (-1)];
  }
  if (m[0] == 2) r++;
  for (long long i = 3; i < m[0]; i++) {
    r1 += i;
  }
  if (m[0] >= 3) b = 1;
  if (b) r += r1;
  cout << r;
  return 0;
}
