#include <bits/stdc++.h>
using namespace std;
int A[200005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int i, n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] < 0) {
      A[i] *= -1;
    }
  }
  sort(A, A + n);
  long long ctr = 0;
  for (int i = 0; i < n; i++) {
    int pos = upper_bound(A, A + n, 2 * A[i]) - A;
    if (pos == n) {
      ctr += (n - 1 - i);
    } else {
      ctr += (pos - 1 - i);
    }
  }
  cout << ctr;
}
