#include #include using namespace std; #define int long long int comb(int a){return (a*(a-1))/2;} signed main(){ int n;cin>>n; mapedge; vectora(n); for(int i=0;i>a[i]; for(int i:a)edge[i]++; sort(a.begin(),a.end()); int ans=0; for(auto[i,j]:edge){ int rt=lower_bound(a.begin(),a.end(),2*i)-a.begin(); ans+=comb(j)*(rt-j); } cout<