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

public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int line = Integer.parseInt(br.readLine());

        if(line == 1){
            System.out.println(line);
        }
        else{
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int line = Integer.parseInt(br.readLine());

        if(line == 1){
            System.out.println(line);
        }
        else{
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        }
    }
} Main public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int line = Integer.parseInt(br.readLine());

        if(line == 1){
            System.out.println(line);
        }
        else{
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        }
    } main {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int line = Integer.parseInt(br.readLine());

        if(line == 1){
            System.out.println(line);
        }
        else{
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int line = Integer.parseInt(br.readLine()); line Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(line == 1){
            System.out.println(line);
        }
        else{
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        } line == 1 line 1 {
            System.out.println(line);
        } System.out.println(line) System.out.println System.out System System.out line {
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        } int x = 1; x 1 for(; x <= line;){
                x = x * 2;            
            } ; x <= line x line {
                x = x * 2;            
            } {
                x = x * 2;            
            } x = x * 2 x x * 2 x 2 x = x / 2 x x / 2 x 2 System.out.println(x) System.out.println System.out System System.out x String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int line = Integer.parseInt(br.readLine());

        if(line == 1){
            System.out.println(line);
        }
        else{
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int line = Integer.parseInt(br.readLine());

        if(line == 1){
            System.out.println(line);
        }
        else{
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int line = Integer.parseInt(br.readLine());

        if(line == 1){
            System.out.println(line);
        }
        else{
            int x = 1;
            for(; x <= line;){
                x = x * 2;            
            }
            
            x = x / 2;
            System.out.println(x);
        }
    }
}
