#include <bits/stdc++.h>
using namespace std;
long long n, k, x, t, ans = 0, curr, l, r, a = 0, z = 0, y;
vector<long long> v, w;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
    v[i] = abs(v[i]);
  }
  sort(v.begin(), v.end());
  for (long long i = 0; i < n; i++) {
    long long k = (v[i] + 1) / 2;
    long long j = upper_bound(v.begin(), v.end(), k) - v.begin();
    ans += i - j;
    j--;
    while (j >= 0 && v[j] == k) {
      ans++;
      j--;
    }
  }
  cout << ans;
  return 0;
}
