import java.util.Scanner;


	public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			int ret = 64;
			
			while(ret>n) {
				ret /= 2;
			}
			
			System.out.println(ret);
			
	    }
		
	}
	 import java.util.Scanner; Scanner java.util public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			int ret = 64;
			
			while(ret>n) {
				ret /= 2;
			}
			
			System.out.println(ret);
			
	    }
		
	} Main public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			int ret = 64;
			
			while(ret>n) {
				ret /= 2;
			}
			
			System.out.println(ret);
			
	    } main {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			int ret = 64;
			
			while(ret>n) {
				ret /= 2;
			}
			
			System.out.println(ret);
			
	    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int ret = 64; ret 64 while(ret>n) {
				ret /= 2;
			} ret>n ret n {
				ret /= 2;
			} ret /= 2 ret 2 System.out.println(ret) System.out.println System.out System System.out ret String[] args args public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			int ret = 64;
			
			while(ret>n) {
				ret /= 2;
			}
			
			System.out.println(ret);
			
	    }
		
	} public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			int ret = 64;
			
			while(ret>n) {
				ret /= 2;
			}
			
			System.out.println(ret);
			
	    }
		
	} Main
import java.util.Scanner;


	public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			int ret = 64;
			
			while(ret>n) {
				ret /= 2;
			}
			
			System.out.println(ret);
			
	    }
		
	}
	
