int binary_search(const unsigned *a, int n, const unsigned x)
{
int t=0;
#define u(k) if(a[k+t]>=x)t+=k;
u(50000000)u(25000000)u(12500000)u(6250000)u(3125000)u(1562500)u(781250)u(390625)u(195312)u(97656)u(48828)u(24414)u(12207)u(6104)u(3052)u(1526)u(763)u(381)u(191)u(95)u(48)u(24)u(12)u(6)u(3)u(1)u(1)return t;
}