#include <bits/stdc++.h>
using namespace std;
mt19937 myrand(chrono::steady_clock::now().time_since_epoch().count());
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "{ ";
  for (auto v : V) os << v << " ";
  return os << "}";
}
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
const long long maxn = 2 * (long long)1e5 + 10;
const long double EPS = 1e-9;
const long long INF = (long long)1e18 + 18;
const long long mod = (long long)998244353;
long long n;
vector<long long> a;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  a.resize(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 0) a[i] = -a[i];
  }
  sort(a.begin(), a.end());
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    long long low = lower_bound(a.begin(), a.end(), (a[i] + 1) / 2) - a.begin();
    long long high = upper_bound(a.begin(), a.end(), 2 * a[i]) - a.begin();
    --high;
    if (high < 0 || low > high) continue;
    ans += high - low;
  }
  assert(ans % 2 == 0);
  cout << ans / 2 << '\n';
  return 0;
}
