#include <bits/stdc++.h>
using namespace std;
long long MAXN = 9223372036854775807, mod = 998244353;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long T = 1;
  for (long long t = 0; t < T; t++) {
    long long n;
    cin >> n;
    vector<long long> arr(n);
    for (long long i = 0; i < n; i++) {
      cin >> arr[i];
      arr[i] = abs(arr[i]);
    }
    long long ans = 0, cnt = 0;
    sort(arr.begin(), arr.end());
    for (long long i = 0; i < n; i++) {
      ans = ans + (upper_bound(arr.begin(), arr.end(), arr[i] * 2) -
                   (arr.begin() + i + 1));
    }
    cout << ans << '\n';
  }
  return 0;
}
