#include <bits/stdc++.h>
using namespace std;
const double Pi = acos(-1.0);
const long double Eps = 1e-10;
const int MAXN = 1e5;
int nc[11] = {0}, pc[11] = {0};
int main() {
  int n, t;
  unsigned long long ans = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    t >= 0 ? pc[abs(t)]++ : nc[abs(t)]++;
  }
  ans = pc[0] * 1ll * (pc[0] - 1) / 2;
  for (int i = 1; i <= 10; i++)
    if (nc[i] && pc[i]) ans += nc[i] * 1ll * pc[i];
  cout << ans << endl;
  return 0;
}
