#include <bits/stdc++.h>
using namespace std;
int n, a[200010];
int main() {
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; ++i) {
      scanf("%d", a + i);
      if (a[i] < 0) {
        a[i] = -a[i];
      }
    }
    sort(a + 1, a + 1 + n);
    long long res = 0;
    for (int i = 1; i <= n; ++i) {
      long long x = a[i];
      int pos = upper_bound(a + 1, a + 1 + n, 2 * x) - a - 1;
      res += pos - i;
    }
    printf("%lld\n", res);
  }
  return 0;
}
