#include <bits/stdc++.h>   using namespace std;   const int maxn = 2e5 + 5;   long long n, m, ans, a, b, temp;   int t;   long long num[maxn];   long long mark[maxn];   int main() {     cin >> n;     for (int i = 0; i < n; i++) {       cin >> num[i];       num[i] = abs(num[i]);     }     sort(num, num + n);     int l = 0, r = 0;     while (l < n) {       while (r < n && 2 * num[l] >= num[r]) {         r++;       }       ans += r - l - 1;       l++;     }     cout << ans << endl;   }   