function Main(input) {
	var n = input.split("\n");
	//comparing
	var two = 1;
	while(!(two <= n && n < two * 2)){
		two *= 2;
	}
	//出力
	console.log(two);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));