Number whith even position bits are set 1

please help me…

I have a number N
I want to find a another number X
such that X is equal to N or X just greater than N
and X’s even position bits are set 1 and odd position bits are set 0.
how to find it??

Ex.
N= 25 = 11001
X = 32 = 100000

N = 35 = 100011
X = 40 = 101000

Follow a greedy approach start from the left most even bit near X, set the even bits and move towards right, in case after setting all the even bits from left to right, the number is not greater than or equal to N. Then do one thing, just set the even bit to the left of the leftmost bit which was set, and you get your answer.