#include <bits/stdc++.h>
using namespace std;
int cnt[30];
int main() {
  int n;
  scanf("%d", &n);
  while (n--) {
    int x;
    scanf("%d", &x);
    cnt[x + 10]++;
  }
  long long ans = 0;
  for (int i = 10; i <= 20; i++) {
    if (i == 10) {
      ans += ((long long)cnt[i] * (cnt[i] - 1)) / 2;
    } else {
      ans += (long long)cnt[i] * (cnt[-(i - 10) + 10]);
    }
  }
  cout << ans << "\n";
}
