#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 9;
signed main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(10);
  cout << fixed;
  long long n, temp, ans = 0;
  cin >> n;
  vector<long long> a;
  for (long long i = 0; i < n; i++) {
    cin >> temp;
    if (temp < 0) {
      a.push_back(-temp);
    } else if (temp >= 0) {
      a.push_back(temp);
    }
  }
  sort((a).begin(), (a).end());
  for (long long i = 0; i < n; i++) {
    long long index = upper_bound((a).begin(), (a).end(), 2 * a[i]) - a.begin();
    ans += index - i - 1;
  }
  cout << ans;
  return 0;
}
