#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int main() {
  int a[100010][3] = {0};
  int n;
  long long int couples = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int temp;
    scanf("%d", &temp);
    int had = 1;
    for (int j = 0; j < i; j++) {
      if (a[j][0] == temp) {
        had = 0;
        a[j][1]++;
        break;
      } else if (a[j][0] == (-temp)) {
        had = 0;
        a[j][2]++;
        break;
      }
    }
    if (had == 1) {
      a[i][0] = temp;
      a[i][1]++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i][1] == 0) continue;
    if (a[i][0] == 0) {
      couples += (long long)a[i][1] * (a[i][1] - 1) / 2;
    } else {
      couples += (long long)a[i][1] * a[i][2];
    }
  }
  cout << couples << endl;
  return 0;
}
