#include <bits/stdc++.h>
using namespace std;
unsigned long long ans, cnt[25], n;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x == 0) cnt[x]++;
    if (x < 0) cnt[-x]++;
    if (x > 0) cnt[x + 10]++;
  }
  for (int i = 1; i <= 10; i++) ans += (cnt[i] * cnt[i + 10]);
  ans = (ans + (cnt[0] * (cnt[0] - 1)) / 2);
  cout << ans << endl;
  return 0;
}
