#include <bits/stdc++.h>
using namespace std;
int n, a[200001], i1, i2;
long long ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i] = abs(a[i]);
  sort(a + 1, a + n + 1);
  int j = 1;
  for (int i = 2; i <= n; i++)
    for (; j < i; j++)
      if (a[j] * 2 >= a[i]) {
        ans += (i - j);
        break;
      }
  printf("%lld", ans);
}
