#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[200005];
int main() {
  cin >> n;
  vector<long long> v;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    v.push_back(abs(a[i]));
  }
  sort(v.begin(), v.end());
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    long long tmp = 2 * abs(a[i]);
    long long tnt = (abs(a[i]) + 1) / 2;
    long long cnc = lower_bound(v.begin(), v.end(), tnt) - v.begin();
    long long cnt = upper_bound(v.begin(), v.end(), tmp) - v.begin() - 1;
    ans += cnt - cnc;
  }
  cout << (ans + 1) / 2 << endl;
  return 0;
}
