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