#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 1e3 + 10;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (auto &x : v) {
    cin >> x;
    x = abs(x);
  }
  sort(v.begin(), v.end());
  int ptr = 0;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    while (ptr < n && v[i] * 2 >= v[ptr]) ptr++;
    ans += ptr - i - 1;
  }
  cout << ans << endl;
  return 0;
}
