import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[]d = new int[6];
		d[0]=2;
		for(int i=1;i<6;i++) {
			d[i]=d[i-1]*2;
		}
		if(N==1)System.out.print(1);
		else if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					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 = sc.nextInt();
		int[]d = new int[6];
		d[0]=2;
		for(int i=1;i<6;i++) {
			d[i]=d[i-1]*2;
		}
		if(N==1)System.out.print(1);
		else if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			}
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[]d = new int[6];
		d[0]=2;
		for(int i=1;i<6;i++) {
			d[i]=d[i-1]*2;
		}
		if(N==1)System.out.print(1);
		else if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			}
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[]d = new int[6];
		d[0]=2;
		for(int i=1;i<6;i++) {
			d[i]=d[i-1]*2;
		}
		if(N==1)System.out.print(1);
		else if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			}
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[]d = new int[6]; d new int[6] 6 d[0]=2 d[0] d 0 2 for(int i=1;i<6;i++) {
			d[i]=d[i-1]*2;
		} int i=1; int i=1; i 1 i<6 i 6 i++ i++ i {
			d[i]=d[i-1]*2;
		} {
			d[i]=d[i-1]*2;
		} d[i]=d[i-1]*2 d[i] d i d[i-1]*2 d[i-1] d i-1 i 1 2 if(N==1)System.out.print(1);
		else if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			}
		} N==1 N 1 System.out.print(1) System.out.print System.out System System.out 1 if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			}
		} d[5]<=N d[5] d 5 N System.out.print(d[5]) System.out.print System.out System System.out d[5] d 5 {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			}
		} for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			} int i=0; int i=0; i 0 i<6 i 6 i++ i++ i {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			} {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			} if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				} N<d[i] N d[i] d i {
					System.out.print(d[i-1]);
					break;
				} System.out.print(d[i-1]) System.out.print System.out System System.out d[i-1] d i-1 i 1 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 = sc.nextInt();
		int[]d = new int[6];
		d[0]=2;
		for(int i=1;i<6;i++) {
			d[i]=d[i-1]*2;
		}
		if(N==1)System.out.print(1);
		else if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			}
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[]d = new int[6];
		d[0]=2;
		for(int i=1;i<6;i++) {
			d[i]=d[i-1]*2;
		}
		if(N==1)System.out.print(1);
		else if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					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 = sc.nextInt();
		int[]d = new int[6];
		d[0]=2;
		for(int i=1;i<6;i++) {
			d[i]=d[i-1]*2;
		}
		if(N==1)System.out.print(1);
		else if(d[5]<=N)System.out.print(d[5]);
		else {
			for(int i=0;i<6;i++) {
				if(N<d[i]) {
					System.out.print(d[i-1]);
					break;
				}
			}
		}
		sc.close();
	}
}