import java.util.Scanner;

public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int N = scanner.nextInt();
		    int count = 0;
		    
		    while( N != 1 ) 
		    {
		    	N = N /2;
		    	count = count + 1;
		    }
		    System.out.println((int) Math.pow(2,count) );
		    scanner.close(); }
		  } import java.util.Scanner; Scanner java.util public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int N = scanner.nextInt();
		    int count = 0;
		    
		    while( N != 1 ) 
		    {
		    	N = N /2;
		    	count = count + 1;
		    }
		    System.out.println((int) Math.pow(2,count) );
		    scanner.close(); }
		  } Main public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int N = scanner.nextInt();
		    int count = 0;
		    
		    while( N != 1 ) 
		    {
		    	N = N /2;
		    	count = count + 1;
		    }
		    System.out.println((int) Math.pow(2,count) );
		    scanner.close(); } main {
		    Scanner scanner = new Scanner(System.in);
		    
		    int N = scanner.nextInt();
		    int count = 0;
		    
		    while( N != 1 ) 
		    {
		    	N = N /2;
		    	count = count + 1;
		    }
		    System.out.println((int) Math.pow(2,count) );
		    scanner.close(); } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int count = 0; count 0 while( N != 1 ) 
		    {
		    	N = N /2;
		    	count = count + 1;
		    } N != 1 N 1 {
		    	N = N /2;
		    	count = count + 1;
		    } N = N /2 N N /2 N 2 count = count + 1 count count + 1 count 1 System.out.println((int) Math.pow(2,count) ) System.out.println System.out System System.out (int) Math.pow(2,count) Math.pow Math 2 count scanner.close() scanner.close scanner String args[] args public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int N = scanner.nextInt();
		    int count = 0;
		    
		    while( N != 1 ) 
		    {
		    	N = N /2;
		    	count = count + 1;
		    }
		    System.out.println((int) Math.pow(2,count) );
		    scanner.close(); }
		  } public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int N = scanner.nextInt();
		    int count = 0;
		    
		    while( N != 1 ) 
		    {
		    	N = N /2;
		    	count = count + 1;
		    }
		    System.out.println((int) Math.pow(2,count) );
		    scanner.close(); }
		  } Main
import java.util.Scanner;

public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		    
		    int N = scanner.nextInt();
		    int count = 0;
		    
		    while( N != 1 ) 
		    {
		    	N = N /2;
		    	count = count + 1;
		    }
		    System.out.println((int) Math.pow(2,count) );
		    scanner.close(); }
		  }