#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  long long ans = 0;
  long long plus[11];
  long long minus[11];
  memset(plus, 0, sizeof(plus));
  memset(minus, 0, sizeof(minus));
  for (int i = 0; i < N; i++) {
    int cur;
    cin >> cur;
    bool isPlus = (cur >= 0);
    cur = abs(cur);
    if (isPlus)
      plus[cur]++;
    else
      minus[cur]++;
  }
  ans += plus[0] * (plus[0] - 1) / 2;
  for (int i = 1; i <= 10; i++) ans += (plus[i] * minus[i]);
  cout << ans << endl;
  return 0;
}
