import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
    	Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
	    
        if(N==1){
            System.out.println(1);
        }else if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        }
	    

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
    	Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
	    
        if(N==1){
            System.out.println(1);
        }else if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        }
	    

    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
    	Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
	    
        if(N==1){
            System.out.println(1);
        }else if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        }
	    

    } main {
        // Your code here!
    	Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
	    
        if(N==1){
            System.out.println(1);
        }else if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        }
	    

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc if(N==1){
            System.out.println(1);
        }else if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        } N==1 N 1 {
            System.out.println(1);
        } System.out.println(1) System.out.println System.out System System.out 1 if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        } N<=3 N 3 {
            System.out.println(2);
        } System.out.println(2) System.out.println System.out System System.out 2 if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        } N>3 && N<8 N>3 N 3 N<8 N 8 {
            System.out.println(4);
        } System.out.println(4) System.out.println System.out System System.out 4 if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        } N>=8 && N<16 N>=8 N 8 N<16 N 16 {
            System.out.println(8);
        } System.out.println(8) System.out.println System.out System System.out 8 if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        } N>=16 && N<31 N>=16 N 16 N<31 N 31 {
            System.out.println(16);
        } System.out.println(16) System.out.println System.out System System.out 16 if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        } N>=32 && N<64 N>=32 N 32 N<64 N 64 {
            System.out.println(32);
        } System.out.println(32) System.out.println System.out System System.out 32 {
            System.out.println(64);
        } System.out.println(64) System.out.println System.out System System.out 64 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
    	Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
	    
        if(N==1){
            System.out.println(1);
        }else if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        }
	    

    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
    	Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
	    
        if(N==1){
            System.out.println(1);
        }else if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        }
	    

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
    	Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
	    
        if(N==1){
            System.out.println(1);
        }else if(N<=3){
            System.out.println(2);
        }else if(N>3 && N<8){
            System.out.println(4);
        }else if(N>=8 && N<16){
            System.out.println(8);
        }else if(N>=16 && N<31){
            System.out.println(16);
        }else if(N>=32 && N<64){
            System.out.println(32);
        }else{
            System.out.println(64);
        }
	    

    }
}
