#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ar[200005];
  for (int i = 1; i <= n; i++) cin >> ar[i];
  int pos = -1;
  for (int i = 1; i <= n; i++) {
    if (ar[i] < 0) {
      ar[i] = -ar[i];
    }
  }
  sort(ar + 1, ar + n + 1);
  long long int ans = 0;
  int l = 0;
  int r = n;
  int mid;
  for (int i = 1; i <= n - 1; i++) {
    long long int com = 2 * ar[i];
    int l = 1;
    int r = n;
    int mid;
    while (l <= r) {
      mid = (l + r) / 2;
      if (ar[mid] <= com)
        l = mid + 1;
      else
        r = mid - 1;
    }
    ans += r - i;
  }
  cout << ans;
  return 0;
}
