#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-6;
const long double pi = acos(-1.0);
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1, 0},
    dy[] = {1, 0, -1, 0, 1, -1, 1, -1, 0};
long long app[80];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (int)(n); ++i) {
    int t;
    cin >> t;
    t += 10;
    ++app[t];
  }
  long long ans = 0;
  for (int i = 0; i <= 10; ++i) {
    if (i)
      ans += app[10 + i] * app[10 - i];
    else
      ans += app[10] * (app[10] - 1) / 2;
  }
  cout << ans << endl;
}
