#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793238462643383279502884;
bool comp(long long& f, long long& s) { return abs(f) < abs(s); }
int main() {
  cin.sync_with_stdio(0);
  int n;
  vector<long long> a;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    a.push_back(abs(x));
  }
  sort(a.begin(), a.end());
  long long ans = 0;
  for (int i = 0; i < n; ++i) {
    ans += (upper_bound(a.begin(), a.end(), a[i] * 2) - a.begin()) - i - 1;
  }
  cout << ans;
  return 0;
}
