#include <bits/stdc++.h>
using namespace std;
const long long inf = 0x3f3f3f3f;
const double eps = 1e-6;
const long long mod = 1000000007;
long long modpow(long long x, long long y, long long md = mod) {
  if (y == 0) return 1;
  long long ret = modpow(x, y >> 1, md);
  ret = (long long)ret * ret % md;
  if (y & 1) ret = (long long)ret * x % md;
  return ret;
}
long long n;
long long a[200005];
signed main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    a[i] = abs(x);
  }
  long long ans = 0;
  sort(a + 1, a + n + 1);
  for (long long i = 1; i <= n; i++) {
    ans += upper_bound(a, a + n + 1, a[i] * 2) - a - i - 1;
  }
  cout << ans << endl;
  return 0;
}
