#include <bits/stdc++.h>
int main() {
  long long int counts[2 * 10 + 1] = {0}, n, temp, sum = 0;
  std::cin >> n;
  while (n--) {
    std::cin >> temp;
    ++counts[temp + 10];
  }
  for (int i = 0; i < 10; ++i) {
    sum += counts[i] * counts[(10 << 1) - i];
  }
  sum += ((counts[10] * (counts[10] - 1)) >> 1);
  std::cout << sum << '\n';
}
