
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Integer num=new Scanner(System.in).nextInt();
		int nowNum=1;
		while(nowNum*2<=num) {
			nowNum*=2;
		}
		System.out.println(nowNum);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Integer num=new Scanner(System.in).nextInt();
		int nowNum=1;
		while(nowNum*2<=num) {
			nowNum*=2;
		}
		System.out.println(nowNum);
	}
} Main public static void main(String[] args) {
		Integer num=new Scanner(System.in).nextInt();
		int nowNum=1;
		while(nowNum*2<=num) {
			nowNum*=2;
		}
		System.out.println(nowNum);
	} main {
		Integer num=new Scanner(System.in).nextInt();
		int nowNum=1;
		while(nowNum*2<=num) {
			nowNum*=2;
		}
		System.out.println(nowNum);
	} Integer num=new Scanner(System.in).nextInt(); num new Scanner(System.in).nextInt() new Scanner(System.in).nextInt new Scanner(System.in) int nowNum=1; nowNum 1 while(nowNum*2<=num) {
			nowNum*=2;
		} nowNum*2<=num nowNum*2 nowNum 2 num {
			nowNum*=2;
		} nowNum*=2 nowNum 2 System.out.println(nowNum) System.out.println System.out System System.out nowNum String[] args args public class Main {
	public static void main(String[] args) {
		Integer num=new Scanner(System.in).nextInt();
		int nowNum=1;
		while(nowNum*2<=num) {
			nowNum*=2;
		}
		System.out.println(nowNum);
	}
} public class Main {
	public static void main(String[] args) {
		Integer num=new Scanner(System.in).nextInt();
		int nowNum=1;
		while(nowNum*2<=num) {
			nowNum*=2;
		}
		System.out.println(nowNum);
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Integer num=new Scanner(System.in).nextInt();
		int nowNum=1;
		while(nowNum*2<=num) {
			nowNum*=2;
		}
		System.out.println(nowNum);
	}
}