#include <bits/stdc++.h>
const int MAXN = 201000;
int n;
int arr1[MAXN];
int main() {
  std::scanf("%d", &n);
  for (int i = 0; i < n; ++i) std::scanf("%d", &arr1[i]);
  for (int i = 0; i < n; ++i) arr1[i] = std::abs(arr1[i]);
  std::sort(arr1, arr1 + n);
  long long result = 0;
  for (int i = 1, j = 0; i < n; ++i) {
    while (j < i && arr1[j] * 2 < arr1[i]) ++j;
    result += i - j;
  }
  std::printf("%lld\n", result);
}
