The are N (N=2^i, i>=0) players attending a competition.
In the first round, they compete in pairs, and half of them advance into the second round.
In the second round, they compete in pairs, and half of them advance into the third round.
The last one is the finnal winner.
Each player has his rank(from 1 to N, the smaller the better).
Player 1's rank is 1, player 2's rank is 2, and so on.
If the difference rank of two players is larger than K, the small-rank one can always beat the other.
Given N(1<=N<=65536)and K(0<=K<=N), who can be the finnal winner with the largest rank?
round1: 6->7 5->3 4->8 2->1
round2: 6->5 4->2
A->B means A beat B.
It's possible than 4->6 in the third round, but we should only consider the best
case for the reason of maximizing the winner's rank.
In another word, we can control the result between any two players, except when
their rank difference is larger than K.