#include <bits/stdc++.h>
using namespace std;
int n, a[200005];
long long ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] = abs(a[i]);
  }
  sort(a + 1, a + n + 1);
  int j = 1;
  for (int i = 1; i <= n; i++) {
    while (a[j] <= 2 * a[i] && j <= n) j++;
    ans += 1LL * (j - 1 - i);
  }
  printf("%I64d\n", ans);
}
