import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double a = Math.log(n) / Math.log(2);
        int a1 = (int) a;
        System.out.println((int) Math.pow(2, a1));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double a = Math.log(n) / Math.log(2);
        int a1 = (int) a;
        System.out.println((int) Math.pow(2, a1));
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double a = Math.log(n) / Math.log(2);
        int a1 = (int) a;
        System.out.println((int) Math.pow(2, a1));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double a = Math.log(n) / Math.log(2);
        int a1 = (int) a;
        System.out.println((int) Math.pow(2, a1));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc double a = Math.log(n) / Math.log(2); a Math.log(n) / Math.log(2) Math.log(n) Math.log Math n Math.log(2) Math.log Math 2 int a1 = (int) a; a1 (int) a System.out.println((int) Math.pow(2, a1)) System.out.println System.out System System.out (int) Math.pow(2, a1) Math.pow Math 2 a1 String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double a = Math.log(n) / Math.log(2);
        int a1 = (int) a;
        System.out.println((int) Math.pow(2, a1));
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double a = Math.log(n) / Math.log(2);
        int a1 = (int) a;
        System.out.println((int) Math.pow(2, a1));
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double a = Math.log(n) / Math.log(2);
        int a1 = (int) a;
        System.out.println((int) Math.pow(2, a1));
    }
}