inline int __lg2_(LL num){ LL l = 0,r = 60; while(l<r){ LL mid = l + r + 1 >> 1; if(pow(2,mid) > num)r = mid - 1; else l = mid; } return (int)l; }