import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        a.add(2);a.add(4);a.add(8);a.add(16);a.add(32);a.add(64);
        for(int i = scan.nextInt(); i >= 1; i--){
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        }
        System.out.println(1);
        scan.close();
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        a.add(2);a.add(4);a.add(8);a.add(16);a.add(32);a.add(64);
        for(int i = scan.nextInt(); i >= 1; i--){
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        }
        System.out.println(1);
        scan.close();
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        a.add(2);a.add(4);a.add(8);a.add(16);a.add(32);a.add(64);
        for(int i = scan.nextInt(); i >= 1; i--){
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        }
        System.out.println(1);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        a.add(2);a.add(4);a.add(8);a.add(16);a.add(32);a.add(64);
        for(int i = scan.nextInt(); i >= 1; i--){
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        }
        System.out.println(1);
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) ArrayList<Integer> a = new ArrayList<>(); a new ArrayList<>() a.add(2) a.add a 2 a.add(4) a.add a 4 a.add(8) a.add a 8 a.add(16) a.add a 16 a.add(32) a.add a 32 a.add(64) a.add a 64 for(int i = scan.nextInt(); i >= 1; i--){
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        } int i = scan.nextInt(); int i = scan.nextInt(); i scan.nextInt() scan.nextInt scan i >= 1 i 1 i-- i-- i {
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        } {
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        } if(a.contains(i)){
                System.out.println(i);
                return;
            } a.contains(i) a.contains a i {
                System.out.println(i);
                return;
            } System.out.println(i) System.out.println System.out System System.out i return; System.out.println(1) System.out.println System.out System System.out 1 scan.close() scan.close scan String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        a.add(2);a.add(4);a.add(8);a.add(16);a.add(32);a.add(64);
        for(int i = scan.nextInt(); i >= 1; i--){
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        }
        System.out.println(1);
        scan.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        a.add(2);a.add(4);a.add(8);a.add(16);a.add(32);a.add(64);
        for(int i = scan.nextInt(); i >= 1; i--){
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        }
        System.out.println(1);
        scan.close();
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> a = new ArrayList<>();
        a.add(2);a.add(4);a.add(8);a.add(16);a.add(32);a.add(64);
        for(int i = scan.nextInt(); i >= 1; i--){
            if(a.contains(i)){
                System.out.println(i);
                return;
            }
        }
        System.out.println(1);
        scan.close();
    }
}