#include <bits/stdc++.h>
using namespace std;
struct TData {
  long long int x, y;
};
TData D[10 + 1];
long int n;
long long int ans;
int main() {
  for (int i = 1; i <= 10 + 1; i++) {
    D[i].x = 0;
    D[i].y = 0;
  }
  cin >> n;
  for (long int i = 1; i <= n; i++) {
    int t;
    cin >> t;
    if (t > 0)
      D[t].x++;
    else
      D[-t].y++;
  }
  ans = D[0].y * (D[0].y - 1) / 2;
  for (int i = 1; i < 10 + 1; i++) ans = ans + D[i].x * D[i].y;
  cout << ans;
}
