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