#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long> a(21, 0);
  int N;
  cin >> N;
  int tmp;
  for (int i = 0; i < N; ++i) {
    scanf("%d", &tmp);
    ++a[tmp + 10];
  }
  long long res = 0;
  for (int i = 0; i < 10; ++i) {
    res += a[i] * a[20 - i];
  }
  res += (a[10] - 1) * a[10] / 2;
  cout << res << endl;
  return 0;
}
