#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<int, int>, vector<pair<int, int> >,
               greater<pair<int, int> > >
    q;
vector<int> v;
int main() {
  int n, x;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    a[i] = abs(a[i]);
  }
  sort(a, a + n);
  long long int sm = 0;
  for (int i = 0; i < n - 1; i++) {
    x = a[i] + a[i];
    int po = upper_bound(a, a + n, x) - a;
    po--;
    sm += po - i;
  }
  cout << sm << endl;
}
