#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  vector<long long int> a;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    if (x < 0) {
      x = abs(x);
    }
    a.push_back(x);
  }
  sort(a.begin(), a.end());
  vector<long long int> ans(a.size() - 1, 0);
  long long int x = a.size() - 1;
  for (long long int i = a.size() - 2; i >= 0; i--) {
    long long int p = 2 * a[i];
    while (a[x] > p && x > 0) {
      x--;
    }
    ans[i] = x;
  }
  long long int sum = 0;
  for (long long int i = 0; i < ans.size(); i++) {
    sum = sum + abs(ans[i] - i);
  }
  cout << sum;
  return 0;
}
