import java.util.*;
import java.io.*;

class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        sc.close();
        int i=0;
        while(n>1){
            n/=2;
            i++;
        }
        System.out.println(1<<i);
    }
} import java.util.*; util.* java import java.io.*; io.* java class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        sc.close();
        int i=0;
        while(n>1){
            n/=2;
            i++;
        }
        System.out.println(1<<i);
    }
} Main public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        sc.close();
        int i=0;
        while(n>1){
            n/=2;
            i++;
        }
        System.out.println(1<<i);
    } main {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        sc.close();
        int i=0;
        while(n>1){
            n/=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 sc.close() sc.close sc int i=0; i 0 while(n>1){
            n/=2;
            i++;
        } n>1 n 1 {
            n/=2;
            i++;
        } n/=2 n 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.*;
import java.io.*;

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