#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int A[N];
map<int, int> M;
int main() {
  int n;
  cin >> n;
  M.clear();
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
    M[A[i]]++;
  }
  long long ret = 0;
  for (int i = 1; i <= 10; i++) {
    ret += ((long long)M[i] * M[-i]);
  }
  ret += ((long long)(M[0] - 1) * M[0] / 2);
  cout << ret << endl;
}
