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