#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, k, c = 0;
  cin >> n;
  vector<long long> v;
  v.push_back(2 * 1000000007);
  for (long long i = 0; i < n; i++) {
    cin >> k;
    v.push_back(abs(k));
  }
  sort((v).begin(), (v).end());
  long long i = 0, j = 0;
  while (j <= n && i < n) {
    while (v[j] <= 2 * v[i]) j++;
    c += (j - i - 1);
    i++;
  }
  cout << c;
  return 0;
}
