#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
const long long inf = 1e18 + 10;
long long n, m, a[maxn];
int main() {
  int t;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] < 0) a[i] = -a[i];
  }
  sort(a + 1, a + 1 + n);
  a[n + 1] = inf;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += (upper_bound(a + 1, a + 2 + n, a[i] * 2) - a - 1 - i);
  }
  cout << ans << endl;
}
