import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int i=0;
        int num = 1;
        while(num <= N){
            i++;
            num*=2;
        }
        i--;
        System.out.println((1<<i));
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int i=0;
        int num = 1;
        while(num <= N){
            i++;
            num*=2;
        }
        i--;
        System.out.println((1<<i));
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int i=0;
        int num = 1;
        while(num <= N){
            i++;
            num*=2;
        }
        i--;
        System.out.println((1<<i));
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int i=0;
        int num = 1;
        while(num <= N){
            i++;
            num*=2;
        }
        i--;
        System.out.println((1<<i));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int i=0; i 0 int num = 1; num 1 while(num <= N){
            i++;
            num*=2;
        } num <= N num N {
            i++;
            num*=2;
        } i++ i num*=2 num 2 i-- i System.out.println((1<<i)) System.out.println System.out System System.out (1<<i) 1 i String[] args args
import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int i=0;
        int num = 1;
        while(num <= N){
            i++;
            num*=2;
        }
        i--;
        System.out.println((1<<i));
    }
}
