x,i;main(){while(scanf("%d",&x)>0){for(i=1;i<=x;i*=2);printf("%d\n",i);}}