import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int answer =0;
    if(N<2){
      answer =1;
    }else if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    }
    System.out.println(answer);
    

      
  }
  

  
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int answer =0;
    if(N<2){
      answer =1;
    }else if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    }
    System.out.println(answer);
    

      
  }
  

  
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int answer =0;
    if(N<2){
      answer =1;
    }else if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    }
    System.out.println(answer);
    

      
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int answer =0;
    if(N<2){
      answer =1;
    }else if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    }
    System.out.println(answer);
    

      
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int answer =0; answer 0 if(N<2){
      answer =1;
    }else if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    } N<2 N 2 {
      answer =1;
    } answer =1 answer 1 if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    } N<4 N 4 {
      answer=2;
    } answer=2 answer 2 if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    } N<8 N 8 {
      answer=4;
    } answer=4 answer 4 if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    } N<16 N 16 {
      answer=8;
    } answer=8 answer 8 if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    } N<32 N 32 {
      answer =16;
    } answer =16 answer 16 if(N<64){
      answer=32;
    }else{
      answer=64;
    } N<64 N 64 {
      answer=32;
    } answer=32 answer 32 {
      answer=64;
    } answer=64 answer 64 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int answer =0;
    if(N<2){
      answer =1;
    }else if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    }
    System.out.println(answer);
    

      
  }
  

  
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int answer =0;
    if(N<2){
      answer =1;
    }else if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    }
    System.out.println(answer);
    

      
  }
  

  
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int answer =0;
    if(N<2){
      answer =1;
    }else if(N<4){
      answer=2;
    }else if(N<8){
      answer=4;
    }else if(N<16){
      answer=8;
    }else if(N<32){
      answer =16;
    }else if(N<64){
      answer=32;
    }else{
      answer=64;
    }
    System.out.println(answer);
    

      
  }
  

  
}