#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, c;
  cin >> n;
  long long int arr[21] = {0};
  for (int i = 0; i < n; i++) {
    cin >> c;
    if (c >= 0)
      arr[c * 2]++;
    else
      arr[(abs(c) * 2) - 1]++;
  }
  long long sum = (arr[0] * (arr[0] - 1)) / 2;
  for (int i = 1; i < 21; i += 2) {
    sum += arr[i] * arr[i + 1];
  }
  cout << sum;
}
