#include <bits/stdc++.h>
using namespace std;
long long solve(vector<long long> v, vector<long long> y) {
  long long ans = 0, j;
  vector<long long>::iterator it;
  for (int i = 0; i < (y.size()); i++) {
    j = 0;
    j += (long long)(upper_bound(v.begin(), v.end(), 2 * y[i]) -
                     (v.begin() + i));
    ans += (j - 1);
  }
  return ans;
}
int main() {
  long long n, x;
  cin >> n;
  vector<long long> a, b;
  long long c = 0;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x > 0)
      a.push_back(x);
    else if (x < 0)
      a.push_back(abs(x));
    else
      c++;
  }
  if (a.size() > 0) {
    sort(a.begin(), a.end());
    ans += solve(a, a);
  }
  cout << ans;
}
