#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long cnt = 0, p;
  vector<long long> a;
  for (long long i = 0; i < n; i++) {
    cin >> p;
    p = abs(p);
    a.push_back(p);
  }
  sort(a.begin(), a.end());
  p = 0;
  for (long long i = 1; i < n; i++) {
    vector<long long>::iterator ub;
    ub = upper_bound(a.begin(), a.end(), (2 * a[i - 1]));
    long long z = ub - a.begin();
    if (z >= i) cnt += max(p, z - i);
  }
  cout << cnt;
  return 0;
}
