#include <bits/stdc++.h>
int diru[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dirv[] = {-1, 0, 1, -1, 1, -1, 0, 1};
using namespace std;
template <class T>
T sq(T n) {
  return n * n;
}
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
bool inside(T a, T b, T c) {
  return a <= b && b <= c;
}
template <class T>
void setmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void setmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
T power(T N, T P) {
  return (P == 0) ? 1 : N * power(N, P - 1);
}
int main() {
  int n, i;
  int a[100010];
  string s, s1;
  while (scanf("%d", &n) == 1) {
    long long int res = 0, res1 = 0;
    long long int f[100] = {0};
    for (i = 0; i < n; i++) scanf("%d", &a[i]);
    for (i = 0; i < n; i++) {
      if (a[i] >= 0) f[a[i]]++;
    }
    for (i = 0; i < n; i++) {
      if (a[i] == 0) {
        res1 += (f[a[i]] - 1);
      } else if (a[i] < 0) {
        res += (f[(a[i] * -1)]);
      }
    }
    printf("%I64d\n", res + (res1 / 2));
  }
  return 0;
}
