#include <bits/stdc++.h>
using namespace std;
int a[100500], b[100500], c[100500];
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    int x;
    scanf("%d", &x);
    if (x < 0) a[abs(x)]++;
    if (x > 0) b[x]++;
    if (x == 0) c[x]++;
  }
  long long ans = 0;
  for (int i = 0; i <= 10; i++) ans += (long long)a[i] * b[i];
  ans += (long long)((long long)c[0] * (c[0] - 1)) / 2;
  cout << ans << endl;
  return 0;
}
