#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int inf = 0x3f3f3f3f;
const int mod = 998244353;
int main() {
  int n;
  scanf("%d", &n);
  int a[maxn];
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + 1 + n);
  int tot = 1;
  a[tot] = a[1];
  int f = 0;
  long long ans = 0;
  for (int i = 2; i <= n; i++) {
    if (a[i] == a[tot]) {
      continue;
    }
    a[++tot] = a[i];
  }
  for (int i = 1; i <= tot; i++) {
    if (a[i] < 0)
      a[i] = -a[i];
    else
      break;
  }
  sort(a + 1, a + 1 + tot);
  int p = tot - 1;
  for (int i = tot; i >= 1; i--) {
    for (int j = p; j >= 1; j--) {
      if (a[j] >= a[i] - a[j])
        p--;
      else
        break;
    }
    ans += i - p - 1;
  }
  printf("%lld\n", ans);
}
