import java.util.*;enum C{C;System Z;{for(Scanner S=new Scanner(Z.in);S==S;Z.out.println(Long.highestOneBit(S.nextInt())*2));}}