import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer input = new Integer(scanner.next());
		Integer count = 0;
		Integer data = 2;

		while(input >= data) {
			data = data*2;
			count ++ ;
		}


		System.out.println(data/2);

		scanner.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer input = new Integer(scanner.next());
		Integer count = 0;
		Integer data = 2;

		while(input >= data) {
			data = data*2;
			count ++ ;
		}


		System.out.println(data/2);

		scanner.close();
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer input = new Integer(scanner.next());
		Integer count = 0;
		Integer data = 2;

		while(input >= data) {
			data = data*2;
			count ++ ;
		}


		System.out.println(data/2);

		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		Integer input = new Integer(scanner.next());
		Integer count = 0;
		Integer data = 2;

		while(input >= data) {
			data = data*2;
			count ++ ;
		}


		System.out.println(data/2);

		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) Integer input = new Integer(scanner.next()); input new Integer(scanner.next()) Integer count = 0; count 0 Integer data = 2; data 2 while(input >= data) {
			data = data*2;
			count ++ ;
		} input >= data input data {
			data = data*2;
			count ++ ;
		} data = data*2 data data*2 data 2 count ++ count System.out.println(data/2) System.out.println System.out System System.out data/2 data 2 scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer input = new Integer(scanner.next());
		Integer count = 0;
		Integer data = 2;

		while(input >= data) {
			data = data*2;
			count ++ ;
		}


		System.out.println(data/2);

		scanner.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer input = new Integer(scanner.next());
		Integer count = 0;
		Integer data = 2;

		while(input >= data) {
			data = data*2;
			count ++ ;
		}


		System.out.println(data/2);

		scanner.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Integer input = new Integer(scanner.next());
		Integer count = 0;
		Integer data = 2;

		while(input >= data) {
			data = data*2;
			count ++ ;
		}


		System.out.println(data/2);

		scanner.close();
	}

}