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