#include<iostream>
using namespace std;
int main()
{
	int a;
	cin>>a;
	if(a==1)
	cout<<"1";
	else if(a<4)
	cout<<"2";
	else if(a<8)
	cout<<"4";
	else if(a<16)
	cout<<"8";
	else if(a<32)
	cout<<"16";
	else if(a<64)
	cout<<"32";
	else
	cout<<"64";
}