#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using vi = vector<int>;
void solve(int test) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& e : a) {
    cin >> e;
    e = abs(e);
  }
  sort((a).begin(), (a).end());
  ll ans = 0;
  for (int l = 0, r = 0; l < n; l++) {
    while (r < n && 2 * a[l] >= a[r]) r++;
    ans += r - l - 1;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve(i);
    cout << "\n";
  }
}
