import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n;
        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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            System.out.println(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;
        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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            System.out.println(1);
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n;
        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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            System.out.println(1);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n;
        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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            System.out.println(1);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n; n 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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            System.out.println(1);
        } n == 3 || n == 2 n == 3 n 3 n == 2 n 2 {
            System.out.println(2);
        } System.out.println(2) System.out.println System.out System System.out 2 if(n == 1){
            System.out.println(1);
        } n == 1 n 1 {
            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){
        Scanner sc = new Scanner(System.in);
        int n;
        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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            System.out.println(1);
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n;
        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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            System.out.println(1);
        }
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n;
        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 == 3 || n == 2){
            System.out.println(2);
        }else if(n == 1){
            System.out.println(1);
        }
    }
}