#include <bits/stdc++.h>
using namespace std;
long long find(long long arr[], long long i, long long n, long long p) {
  long long j = (i + n) / 2;
  if (arr[i + 1] > p)
    return 0;
  else if (arr[n - 1] <= p)
    return n - 1 - i;
  else if (arr[j] > p && arr[j - 1] <= p)
    return j - 1 - i;
  else if (arr[j] <= p && arr[j + 1] > p)
    return j - i;
  else if (arr[j] <= p)
    return j - i + find(arr, j, n, p);
  else
    return find(arr, i, j, p);
}
int main() {
  long long n, count = 0;
  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);
  for (long long i = 0; i < n - 1; i++) count += find(arr, i, n, arr[i] * 2);
  cout << count;
}
