#include <bits/stdc++.h>
using namespace std;
long long n, x, ans;
vector<long long> v;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    v.push_back(abs(x));
  }
  sort(v.begin(), v.end());
  long long r = 1;
  for (long long l = 0; l < (long long)v.size(); l++) {
    while (r < (long long)v.size() && 2 * v[l] >= v[r]) r++;
    ans += r - l - 1;
  }
  cout << ans;
}
