import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int index = (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0));
		System.out.println((int)Math.pow(2, index));
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		int index = (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0));
		System.out.println((int)Math.pow(2, index));
	}
} Main public static void main(String[] args) {
		int index = (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0));
		System.out.println((int)Math.pow(2, index));
	} main {
		int index = (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0));
		System.out.println((int)Math.pow(2, index));
	} int index = (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0)); index (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0)) Math.log(new Scanner(System.in).nextInt()) Math.log Math new Scanner(System.in).nextInt() new Scanner(System.in).nextInt new Scanner(System.in) Math.log(2.0) Math.log Math 2.0 System.out.println((int)Math.pow(2, index)) System.out.println System.out System System.out (int)Math.pow(2, index) Math.pow Math 2 index String[] args args public class Main {
	public static void main(String[] args) {
		int index = (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0));
		System.out.println((int)Math.pow(2, index));
	}
} public class Main {
	public static void main(String[] args) {
		int index = (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0));
		System.out.println((int)Math.pow(2, index));
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int index = (int)(Math.log(new Scanner(System.in).nextInt()) / Math.log(2.0));
		System.out.println((int)Math.pow(2, index));
	}
}
