import java.util.Scanner;

public class Main {

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

} 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();
		if(N>=64) {
			System.out.println(64);
		}else if(N>=32) {
			System.out.println(32);
		}else if(N>=16) {
			System.out.println(16);
		}else if(N>=8) {
			System.out.println(8);
		}else if(N>=4) {
			System.out.println(4);
		}else if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		}
	}
	public static int sample() {
		return 1;
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(N>=64) {
			System.out.println(64);
		}else if(N>=32) {
			System.out.println(32);
		}else if(N>=16) {
			System.out.println(16);
		}else if(N>=8) {
			System.out.println(8);
		}else if(N>=4) {
			System.out.println(4);
		}else if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if(N>=64) {
			System.out.println(64);
		}else if(N>=32) {
			System.out.println(32);
		}else if(N>=16) {
			System.out.println(16);
		}else if(N>=8) {
			System.out.println(8);
		}else if(N>=4) {
			System.out.println(4);
		}else if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc if(N>=64) {
			System.out.println(64);
		}else if(N>=32) {
			System.out.println(32);
		}else if(N>=16) {
			System.out.println(16);
		}else if(N>=8) {
			System.out.println(8);
		}else if(N>=4) {
			System.out.println(4);
		}else if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		} N>=64 N 64 {
			System.out.println(64);
		} System.out.println(64) System.out.println System.out System System.out 64 if(N>=32) {
			System.out.println(32);
		}else if(N>=16) {
			System.out.println(16);
		}else if(N>=8) {
			System.out.println(8);
		}else if(N>=4) {
			System.out.println(4);
		}else if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		} N>=32 N 32 {
			System.out.println(32);
		} System.out.println(32) System.out.println System.out System System.out 32 if(N>=16) {
			System.out.println(16);
		}else if(N>=8) {
			System.out.println(8);
		}else if(N>=4) {
			System.out.println(4);
		}else if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		} N>=16 N 16 {
			System.out.println(16);
		} System.out.println(16) System.out.println System.out System System.out 16 if(N>=8) {
			System.out.println(8);
		}else if(N>=4) {
			System.out.println(4);
		}else if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		} N>=8 N 8 {
			System.out.println(8);
		} System.out.println(8) System.out.println System.out System System.out 8 if(N>=4) {
			System.out.println(4);
		}else if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		} N>=4 N 4 {
			System.out.println(4);
		} System.out.println(4) System.out.println System.out System System.out 4 if(N>=2) {
			System.out.println(2);
		}else {
			System.out.println(1);
		} N>=2 N 2 {
			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 static int sample() {
		return 1;
	} sample {
		return 1;
	} return 1; 1 public class Main {

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

} public class Main {

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

} Main
import java.util.Scanner;

public class Main {

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

}
