#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, n, findit, cnt = 0, j;
  cin >> n;
  vector<long long int> arr(n);
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] < 0) arr[i] = -arr[i];
  }
  sort(arr.begin(), arr.end());
  vector<long long int>::iterator flag;
  for (i = n - 1; i > 0; i--) {
    if (arr[i] % 2 == 0) {
      flag = upper_bound(arr.begin(), arr.end(), arr[i] / 2 - 1);
      cnt += (arr.end() - flag) - 1;
    } else {
      flag = upper_bound(arr.begin(), arr.end(), arr[i] / 2);
      cnt += (arr.end() - flag) - 1;
    }
    arr.pop_back();
  }
  cout << cnt << endl;
  return 0;
}
