#include <bits/stdc++.h>
using namespace std;
template <class c>
auto try_out(c a) -> decltype(cerr << a, 0);
char try_out(...);
struct debug {
  template <class c>
  debug& operator<<(c) {
    return *this;
  }
};
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using pll = pair<ll, ll>;
using vll = vector<ll>;
int main() {
  for (int i = -10; i <= 10; ++i) {
    for (int j = -10; j <= 10; ++j) {
      int x = min(abs(i), abs(j));
      int y = max(abs(i), abs(j));
      int x2 = min(abs(i - j), abs(i + j));
      int y2 = max(abs(i - j), abs(i + j));
      debug() << "(" << i << ", " << j << "): ";
      debug() << "(x >= x2 && y <= y2)"
              << ": " << (x >= x2 && y <= y2);
      debug() << "\"\\n\""
              << ": "
              << "\n";
    }
  }
  int n;
  scanf("%d", &n);
  vi a(n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    a[i] = abs(a[i]);
  }
  sort((a).begin(), (a).end());
  ll ans = 0;
  int l = 0;
  for (int i = 0; i < n; ++i) {
    while (l < n && a[l] <= a[i] + a[i]) l++;
    ans += l - i - 1;
    debug() << "l"
            << ": " << l;
  }
  printf("%lld\n", ans);
}
