Ivan and Powers of Two
Ivan has got an array of n non-negative integers a1, a2, ..., an. Ivan knows that the array is sorted in the non-decreasing order.Ivan wrote out integers 2a1, 2a2, ..., 2an on a piece of paper.