#include <bits/stdc++.h>
using namespace std;
vector<long long> arr;
long long binarySearchCount(long long n, long long key) {
  long long left = 0, right = n;
  long long mid;
  while (left < right) {
    mid = (right + left) >> 1;
    if (arr[mid] == key) {
      while (mid + 1 < n && arr[mid + 1] == key) mid++;
      break;
    } else if (arr[mid] > key)
      right = mid;
    else
      left = mid + 1;
  }
  while (mid > -1 && arr[mid] > key) mid--;
  return mid;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long x;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    arr.push_back(abs(x));
  }
  sort(arr.begin(), arr.end());
  long long ans = 0;
  for (long long i = 0; i < n - 1; i++) {
    long long temp = binarySearchCount(n, 2 * arr[i]);
    ans += temp - i;
  }
  cout << ans << endl;
}
