import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 1; i < 7; i++) {
            int pow = (int) Math.pow(2, i);
            if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            }
        }

        System.out.println(64);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 1; i < 7; i++) {
            int pow = (int) Math.pow(2, i);
            if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            }
        }

        System.out.println(64);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 1; i < 7; i++) {
            int pow = (int) Math.pow(2, i);
            if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            }
        }

        System.out.println(64);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 1; i < 7; i++) {
            int pow = (int) Math.pow(2, i);
            if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            }
        }

        System.out.println(64);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc for (int i = 1; i < 7; i++) {
            int pow = (int) Math.pow(2, i);
            if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            }
        } int i = 1; int i = 1; i 1 i < 7 i 7 i++ i++ i {
            int pow = (int) Math.pow(2, i);
            if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            }
        } {
            int pow = (int) Math.pow(2, i);
            if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            }
        } int pow = (int) Math.pow(2, i); pow (int) Math.pow(2, i) Math.pow Math 2 i if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            } N == pow N pow {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } int ans = (int) Math.pow(2, i); ans (int) Math.pow(2, i) Math.pow Math 2 i System.out.println(ans) System.out.println System.out System System.out ans return; if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            } N < pow N pow {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            } int ans = (int) Math.pow(2, i - 1); ans (int) Math.pow(2, i - 1) Math.pow Math 2 i - 1 i 1 System.out.println(ans) System.out.println System.out System System.out ans return; System.out.println(64) System.out.println System.out System System.out 64 String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        for (int i = 1; i < 7; i++) {
            int pow = (int) Math.pow(2, i);
            if (N == pow) {
                int ans = (int) Math.pow(2, i);
                System.out.println(ans);
                return;
            } else if (N < pow) {
                int ans = (int) Math.pow(2, i - 1);
                System.out.println(ans);
                return;
            }
        }

        System.out.println(64);
    }
}