#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(6);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
    arr[i] = abs(arr[i]);
  }
  sort(arr, arr + n);
  long long ans = 0;
  long long start = 0;
  for (long long i = 0; i < n; i++) {
    while (2 * arr[start] < arr[i]) start++;
    ans += (i - start);
  }
  cout << ans;
  return 0;
}
