#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, t, a;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<int> v;
  int zero = 0;
  for (i = 0; i < n; i++) {
    cin >> a;
    if (a < 0)
      v.push_back(-a);
    else
      v.push_back(a);
  }
  sort(v.begin(), v.end());
  long long int ans = 0;
  for (auto it = v.begin(); it != v.end(); it++) {
    j = upper_bound(it + 1, v.end(), 2 * (*it)) - v.begin();
    j--;
    ans += j - (it - v.begin());
  }
  cout << ans;
  return 0;
}
