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