#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const long long N = 2e5 + 1;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> nums(n);
  for (long long i = 0; i < n; i++) {
    long long k;
    cin >> k;
    nums[i] = abs(k);
  }
  sort(nums.begin(), nums.end());
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    long long cur = nums[i];
    long long ub = cur * 2;
    if (ub == 0) {
      continue;
    }
    long long low = i + 1;
    long long high = n - 1;
    long long pos = -1;
    while (low <= high) {
      long long mid = low + (high - low) / 2;
      if (nums[mid] <= ub) {
        pos = mid;
        low = mid + 1;
      } else {
        high = mid - 1;
      }
    }
    if (pos != -1) {
      ans += (pos - i);
    }
  }
  cout << ans << endl;
}
