#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int nbr[21];
  int n, val;
  cin >> n;
  for (int i = 0; i < 21; i++) nbr[i] = 0;
  for (int i = 0; i < n; i++) {
    cin >> val;
    nbr[val + 21 / 2]++;
  }
  long long int nb = 0;
  for (int i = 0; i < 21 / 2; i++) nb += (nbr[i] * nbr[21 - i - 1]);
  nb += (nbr[21 / 2] * (nbr[21 / 2] - 1) / 2);
  cout << nb;
  return 0;
}
