#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  VI V(n);
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    if (x < 0) x = -x;
    V[i] = x;
  }
  sort(V.begin(), V.end());
  ll res = 0;
  int d = 0;
  for (int e = 0; e < n; ++e) {
    --d;
    while (++d < n and 2 * V[e] >= V[d])
      ;
    res += d - e - 1;
  }
  cout << res << endl;
}
