import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());
		int[] num = {64, 32, 16, 8, 4, 2, 1};
		
		for (int i = 0; i < 7; i++) {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		}
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());
		int[] num = {64, 32, 16, 8, 4, 2, 1};
		
		for (int i = 0; i < 7; i++) {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());
		int[] num = {64, 32, 16, 8, 4, 2, 1};
		
		for (int i = 0; i < 7; i++) {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());
		int[] num = {64, 32, 16, 8, 4, 2, 1};
		
		for (int i = 0; i < 7; i++) {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] num = {64, 32, 16, 8, 4, 2, 1}; num {64, 32, 16, 8, 4, 2, 1} 64 32 16 8 4 2 1 for (int i = 0; i < 7; i++) {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		} int i = 0; int i = 0; i 0 i < 7 i 7 i++ i++ i {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		} {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		} if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			} n >= num[i] n num[i] num i {
				System.out.println(num[i]);
				break;
			} System.out.println(num[i]) System.out.println System.out System System.out num[i] num i break; sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());
		int[] num = {64, 32, 16, 8, 4, 2, 1};
		
		for (int i = 0; i < 7; i++) {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());
		int[] num = {64, 32, 16, 8, 4, 2, 1};
		
		for (int i = 0; i < 7; i++) {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		}
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.next());
		int[] num = {64, 32, 16, 8, 4, 2, 1};
		
		for (int i = 0; i < 7; i++) {
			if (n >= num[i]) {
				System.out.println(num[i]);
				break;
			}
		}
		sc.close();
	}
}