#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:360777216")
using LL = long long;
const int INF = 2 * 1000 * 1000 * 1000;
LL MOD = 1e9 + 7;
LL LINF = (LL)4e18;
double EPS = 1e-7;
using namespace std;
LL t, m, n, q, x, a, b, k, c, y, da, db;
LL gcd(LL a, LL b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
LL lcm(LL a, LL b) { return a * b / gcd(a, b); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  cin >> n;
  vector<int> ti(n);
  map<int, LL> cnt;
  for (int(i) = 0; (i) < n; (i)++) {
    cin >> ti[i];
    cnt[ti[i]]++;
  }
  LL ans = 0;
  for (int(i) = 1; (i) < 11; (i)++) {
    ans += cnt[i] * cnt[-i];
  }
  ans += cnt[0] * (cnt[0] - 1) / 2;
  cout << ans << endl;
  return 0;
}
