#include <bits/stdc++.h>
using namespace std;
int a[200005];
int main() {
  int n;
  while (cin >> n) {
    for (int i = 1; i <= n; i++) {
      int t;
      cin >> t;
      a[i] = (t > 0) ? t : -t;
    }
    long long ans = 0;
    sort(a + 1, a + 1 + n);
    for (int i = 1; i <= n; i++) {
      ans += upper_bound(a + 1, a + n + 1, 2 * a[i]) - a - 1 - i;
    }
    cout << ans << endl;
  }
}
