import java.util.*;
import java.math.BigInteger;
class Main{

     public static void main(String []args){
      Scanner scan = new Scanner(System.in);
      int x = scan.nextInt();
      for(int i = 6 ; i >=0 ; i--){
          if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          }
      }
    }
} import java.util.*; util.* java import java.math.BigInteger; BigInteger java.math class Main{

     public static void main(String []args){
      Scanner scan = new Scanner(System.in);
      int x = scan.nextInt();
      for(int i = 6 ; i >=0 ; i--){
          if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          }
      }
    }
} Main public static void main(String []args){
      Scanner scan = new Scanner(System.in);
      int x = scan.nextInt();
      for(int i = 6 ; i >=0 ; i--){
          if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          }
      }
    } main {
      Scanner scan = new Scanner(System.in);
      int x = scan.nextInt();
      for(int i = 6 ; i >=0 ; i--){
          if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          }
      }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan for(int i = 6 ; i >=0 ; i--){
          if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          }
      } int i = 6 ; int i = 6 ; i 6 i >=0 i 0 i-- i-- i {
          if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          }
      } {
          if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          }
      } if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          } Math.pow(2,i)<=x Math.pow(2,i) Math.pow Math 2 i x {
            System.out.println((int)Math.pow(2,i));
            break;
          } System.out.println((int)Math.pow(2,i)) System.out.println System.out System System.out (int)Math.pow(2,i) Math.pow Math 2 i break; String []args args
import java.util.*;
import java.math.BigInteger;
class Main{

     public static void main(String []args){
      Scanner scan = new Scanner(System.in);
      int x = scan.nextInt();
      for(int i = 6 ; i >=0 ; i--){
          if(Math.pow(2,i)<=x){
            System.out.println((int)Math.pow(2,i));
            break;
          }
      }
    }
}