#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, a[N];
long long ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i] = fabs(a[i]);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    int tmp = upper_bound(a + 1, a + n + 1, 2 * a[i]) - a;
    if (tmp > n) tmp = n;
    if (a[tmp] > 2 * a[i]) tmp--;
    ans += tmp - i;
  }
  printf("%lld\n", ans);
  return 0;
}
