#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int arr[21] = {0};
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    arr[a + 10]++;
  }
  unsigned long long int res = 0;
  for (int i = 0; i < 10; i++) res += arr[i] * arr[20 - i];
  res += (arr[10] * (arr[10] - 1)) / 2;
  cout << res;
  return 0;
}
