#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  return !b ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  return a * (b / gcd(a, b));
}
template <typename T>
T sqr(T a) {
  return a * a;
}
template <typename T>
T cube(T a) {
  return a * a * a;
}
template <typename T>
inline void smin(T &a, T b) {
  a = a < b ? a : b;
}
template <typename T>
inline void smax(T &a, T b) {
  a = a > b ? a : b;
}
int in() {
  int n;
  scanf("%d", &n);
  return n;
}
long long Lin() {
  long long n;
  scanf("%lld", &n);
  return n;
}
double Din() {
  double n;
  scanf("%lf", &n);
  return n;
}
const long long inf = (long long)1e17;
const long long mod = (long long)1e9 + 7;
const int N = 2e5 + 5;
vector<int> a;
long long bs(int x) {
  int low = 0, high = (int)a.size() - 1;
  long long ans = 0;
  while (low <= high) {
    int mid = (low + high) >> 1;
    if (a[mid] <= x)
      ans = (long long)mid + 1, low = mid + 1;
    else
      high = mid - 1;
  }
  return ans;
}
int solve() {
  int n = in(), zero = 0;
  for (int i = 1; i <= n; i++) {
    int x = in();
    if (x == 0) continue;
    a.push_back(abs(x));
  }
  sort(a.begin(), a.end());
  long long ans = 0;
  for (int i = 0; i < (int)a.size(); i++) {
    ans += bs(a[i] * 2) - bs((a[i] + 1) / 2 - 1) - 1;
  }
  cout << (ans / 2) << '\n';
  return 0;
}
int main() {
  int test = 1, tc = 0;
  while (test--) {
    solve();
  }
  return 0;
}
