#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265358979323846;
void debn(vector<int> a) {
  for (auto v : a) cout << v << ' ';
  cout << endl;
}
void debnn(vector<vector<int>> a) {
  for (auto v : a) {
    for (auto w : v) cout << w << ' ';
    cout << endl;
  }
}
long long powmod(long long x, long long y, long long mod) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    y >>= 1;
    x = x * x % mod;
  }
  return res;
}
vector<int> a;
int bin(int x) {
  int l = 0, r = a.size() - 1;
  while (r - l > 1) {
    int m = (r + l) / 2;
    if (a[m] > x)
      r = m;
    else
      l = m;
  }
  if (a[r] <= x) return r;
  return l;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a[i] = abs(x);
  }
  sort(a.begin(), a.end());
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    int j = bin(2 * a[i]);
    ans += (j - i);
  }
  cout << ans << endl;
}
