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