#include <bits/stdc++.h>
using namespace std;
long long int ara[200005];
long long int i, j, k, x, n, ans = 0;
int Bin(int ITEM) {
  int lo = 1, hi = n, mid, res = 1;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    if (ara[mid] == ITEM) {
      res = mid;
      lo = mid + 1;
    } else if (ara[mid] < ITEM) {
      res = mid;
      lo = mid + 1;
    } else {
      hi = mid - 1;
    }
  }
  return res;
}
int main() {
  scanf("%lld", &(n));
  for (i = 1; i <= n; i++) {
    scanf("%lld", &(x));
    ara[i] = fabs(x);
  }
  sort(ara + 1, ara + n + 1);
  for (i = 1; i <= n; i++) {
    ans += (Bin(ara[i] * 2) - i);
  }
  cout << ans << endl;
  return 0;
}
