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