import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		final Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(64 <= N) {
			System.out.println(64);
		} else if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		final Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(64 <= N) {
			System.out.println(64);
		} else if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		}
	}
} Main public static void main(String[] args) {
		final Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(64 <= N) {
			System.out.println(64);
		} else if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		}
	} main {
		final Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(64 <= N) {
			System.out.println(64);
		} else if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		}
	} final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc if(64 <= N) {
			System.out.println(64);
		} else if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		} 64 <= N 64 N {
			System.out.println(64);
		} System.out.println(64) System.out.println System.out System System.out 64 if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		} 32 <= N 32 N {
			System.out.println(32);
		} System.out.println(32) System.out.println System.out System System.out 32 if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		} 16 <= N 16 N {
			System.out.println(16);
		} System.out.println(16) System.out.println System.out System System.out 16 if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		} 8 <= N 8 N {
			System.out.println(8);
		} System.out.println(8) System.out.println System.out System System.out 8 if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		} 4 <= N 4 N {
			System.out.println(4);
		} System.out.println(4) System.out.println System.out System System.out 4 if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		} 2 <= N 2 N {
			System.out.println(2);
		} System.out.println(2) System.out.println System.out System System.out 2 {
			System.out.println(1);
		} System.out.println(1) System.out.println System.out System System.out 1 String[] args args public class Main {
	public static void main(String[] args) {
		final Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(64 <= N) {
			System.out.println(64);
		} else if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		}
	}
} public class Main {
	public static void main(String[] args) {
		final Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(64 <= N) {
			System.out.println(64);
		} else if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		final Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(64 <= N) {
			System.out.println(64);
		} else if(32 <= N) {
			System.out.println(32);
		} else if(16 <= N) {
			System.out.println(16);
		} else if(8 <= N) {
			System.out.println(8);
		} else if(4 <= N) {
			System.out.println(4);
		} else if(2 <= N) {
			System.out.println(2);
		} else {
			System.out.println(1);
		}
	}
}