#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int a[N], n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    if (a[i] < 0) a[i] = -a[i];
  }
  sort(a, a + n);
  long long ans = 0;
  for (int i = 1; i < n; i++) {
    int t = lower_bound(a, a + n, (a[i] + 1) >> 1) - a;
    ans += i - t;
  }
  printf("%lld\n", ans);
  return 0;
}
