#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
int arr[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    arr[i] = abs(arr[i]);
  }
  sort(arr, arr + n);
  long long int ans = 0;
  for (int i = 0; i < n; ++i) {
    int id = upper_bound(arr, arr + n, arr[i] * 2) - arr;
    ans += max(0, id - 1 - i);
  }
  cout << ans << endl;
  return 0;
}
