import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int max = 0;
    for(int i=2; i<=n; i=i*2) {
        max = Math.max(max,i);
    }
    System.out.println(n==1?1:max);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int max = 0;
    for(int i=2; i<=n; i=i*2) {
        max = Math.max(max,i);
    }
    System.out.println(n==1?1:max);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int max = 0;
    for(int i=2; i<=n; i=i*2) {
        max = Math.max(max,i);
    }
    System.out.println(n==1?1:max);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int max = 0;
    for(int i=2; i<=n; i=i*2) {
        max = Math.max(max,i);
    }
    System.out.println(n==1?1:max);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in int max = 0; max 0 for(int i=2; i<=n; i=i*2) {
        max = Math.max(max,i);
    } int i=2; int i=2; i 2 i<=n i n i=i*2 i=i*2 i i*2 i 2 {
        max = Math.max(max,i);
    } {
        max = Math.max(max,i);
    } max = Math.max(max,i) max Math.max(max,i) Math.max Math max i System.out.println(n==1?1:max) System.out.println System.out System System.out n==1?1:max n==1 n 1 1 max String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int max = 0;
    for(int i=2; i<=n; i=i*2) {
        max = Math.max(max,i);
    }
    System.out.println(n==1?1:max);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int max = 0;
    for(int i=2; i<=n; i=i*2) {
        max = Math.max(max,i);
    }
    System.out.println(n==1?1:max);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    int max = 0;
    for(int i=2; i<=n; i=i*2) {
        max = Math.max(max,i);
    }
    System.out.println(n==1?1:max);
  }
}