#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long int INF = 1e18;
const long double PI =
    3.141592653589793238462643383279502884197169399375105820974944;
int main() {
  long long int n, i, a[200005], sum = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    a[i] = abs(a[i]);
  }
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    sum += upper_bound(a, a + n, 2 * a[i]) - a - i - 1;
  }
  cout << sum;
}
