n=int(input()) ans=0 while n!=0: n>>=1 ans+=1 print(1 <<(ans-1))