#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] < 0) arr[i] *= -1;
  }
  sort(arr.begin(), arr.end());
  int st = 0, end = 1;
  long long cnt = 0;
  while (st < n - 1) {
    if (st == end)
      end++;
    else if (end < n && arr[end] - arr[st] <= arr[st]) {
      end++;
    } else {
      cnt += end - st - 1;
      st++;
    }
  }
  cout << cnt;
  return 0;
}
