import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] nums = {64, 32, 16, 8, 4, 2, 1};
        
        for (int n : nums) {
            if (N >= n) {
                System.out.println(n);
                return;
            }
        }
    }
}
 import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] nums = {64, 32, 16, 8, 4, 2, 1};
        
        for (int n : nums) {
            if (N >= n) {
                System.out.println(n);
                return;
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] nums = {64, 32, 16, 8, 4, 2, 1};
        
        for (int n : nums) {
            if (N >= n) {
                System.out.println(n);
                return;
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] nums = {64, 32, 16, 8, 4, 2, 1};
        
        for (int n : nums) {
            if (N >= n) {
                System.out.println(n);
                return;
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] nums = {64, 32, 16, 8, 4, 2, 1}; nums {64, 32, 16, 8, 4, 2, 1} 64 32 16 8 4 2 1 for (int n : nums) {
            if (N >= n) {
                System.out.println(n);
                return;
            }
        } int n nums {
            if (N >= n) {
                System.out.println(n);
                return;
            }
        } {
            if (N >= n) {
                System.out.println(n);
                return;
            }
        } if (N >= n) {
                System.out.println(n);
                return;
            } N >= n N n {
                System.out.println(n);
                return;
            } System.out.println(n) System.out.println System.out System System.out n return; String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int[] nums = {64, 32, 16, 8, 4, 2, 1};
        
        for (int n : nums) {
            if (N >= n) {
                System.out.println(n);
                return;
            }
        }
    }
}

