import java.util.Arrays;
import java.util.Scanner;

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

        while (n > 0) {
            n /= 2;
            k += 1;
        }

        System.out.println(1 << (k - 1));
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = 0;

        while (n > 0) {
            n /= 2;
            k += 1;
        }

        System.out.println(1 << (k - 1));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = 0;

        while (n > 0) {
            n /= 2;
            k += 1;
        }

        System.out.println(1 << (k - 1));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = 0;

        while (n > 0) {
            n /= 2;
            k += 1;
        }

        System.out.println(1 << (k - 1));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = 0; k 0 while (n > 0) {
            n /= 2;
            k += 1;
        } n > 0 n 0 {
            n /= 2;
            k += 1;
        } n /= 2 n 2 k += 1 k 1 System.out.println(1 << (k - 1)) System.out.println System.out System System.out 1 << (k - 1) 1 (k - 1) k 1 String[] args args
import java.util.Arrays;
import java.util.Scanner;

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

        while (n > 0) {
            n /= 2;
            k += 1;
        }

        System.out.println(1 << (k - 1));
    }
}