#include <bits/stdc++.h>
using namespace std;
int a[111111];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  sort(a, a + n);
  long long res = 0;
  for (int i = 1; i <= 10; ++i) {
    int x = upper_bound(a, a + n, i) - lower_bound(a, a + n, i);
    long long y = upper_bound(a, a + n, -i) - lower_bound(a, a + n, -i);
    res += x * y;
  }
  long long x = upper_bound(a, a + n, 0) - lower_bound(a, a + n, 0);
  res += x * (x - 1) / 2;
  cout << res << endl;
  return 0;
}
