#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int a[n], ans = 0;
  for (int i = 0; i < n; i++) {
    int p;
    cin >> p;
    a[i] = abs(p);
  }
  sort(a, a + n);
  int p = 0;
  for (int i = 0; i < n; i++) {
    while (p < n && a[p] <= 2 * a[i]) p++;
    ans += p - i - 1;
  }
  cout << ans;
  return 0;
}
