#include <bits/stdc++.h>
using namespace std;
template <typename item>
item abs(item i) {
  if (i < 0) i = -i;
  return i;
}
template <class typea>
typea POW(typea b, typea p) {
  typea res = 1;
  while (p) {
    if (p & 1) res *= b;
    b *= b;
    b %= 1000000007LL;
    res %= 1000000007LL;
    p /= 2;
  }
  return res;
}
template <class typea, class typeb>
typea POW(typea b, typeb p) {
  typea res = 1;
  while (p) {
    if (p & 1) res *= b;
    b *= b;
    p /= 2;
  }
  return res;
}
int tc = 0;
long long int arr[2 * 100000 + 10];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  long long int cnt = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i], arr[i] = abs(arr[i]);
  sort(arr + 1, arr + 1 + n);
  long long int temp;
  for (int i = 1; i <= n; i++) {
    cnt += upper_bound(arr + i, arr + 1 + n, 2 * arr[i]) -
           lower_bound(arr + i, arr + 1 + n, arr[i]) - 1;
  }
  cout << cnt;
  return 0;
}
