import java.util.*;enum B{B;System z;{for(Scanner s=new Scanner(z.in);s==s;)z.out.println(2*Long.highestOneBit(s.nextInt()));}}