# -*- coding: utf-8 -*-
"""
Created on Mon Oct 26 13:04:45 2020

@author: heena
"""

x=int(input())
stick=64
for i in range(x):
    if stick>x:
        if (stick/2)>=x:
            stick=stick/2
64
32 32
16 16
8 8