#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 100005;
long long n, a[2 * MAXN], ans = 0;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0, ThxDem = n; i < ThxDem; i++) {
    cin >> a[i];
    a[i] = abs(a[i]);
  }
  sort(a, a + n);
  long long pos = 1;
  a[n] = LONG_MAX;
  for (int i = 0, ThxDem = n - 1; i < ThxDem; i++) {
    for (int j = max((long long)i + 1, pos), ThxDem = n + 1; j < ThxDem; j++)
      if (a[i] * 2 < a[j]) {
        pos = j;
        ans += j - i - 1;
        break;
      }
  }
  cout << ans;
  return 0;
}
