can any 1 plz help me in solving this problem

http://www.spoj.pl/problems/MZVRK/

here's what i have

I'd be grateful if any 1 can help !Code:=> the zvrks of any odd number will be =1 . => all the numbers (when the process is done) will have exactly one '1' & remaining zeros hence when converted back to decimal each number will be in the form 2^k . => these numbers have certain pattern . ex: if sum of all zvrks from 2^k <=> 2^k+1 is Z , then sum of all zvrks of 2^k+1 <=> 2^k+1 will be 2*Z+(2^k+1 - 2^k) . [:P] but nt able to proceed after this

thank u very much