import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i = 1; i <= n; i *= 2) if(n < i * 2) System.out.println(i);
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i = 1; i <= n; i *= 2) if(n < i * 2) System.out.println(i);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i = 1; i <= n; i *= 2) if(n < i * 2) System.out.println(i);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i = 1; i <= n; i *= 2) if(n < i * 2) System.out.println(i);
	} 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 <= n; i *= 2) if(n < i * 2) System.out.println(i); int i = 1; int i = 1; i 1 i <= n i n i *= 2 i *= 2 i 2 if(n < i * 2) System.out.println(i); if(n < i * 2) System.out.println(i); n < i * 2 n i * 2 i 2 System.out.println(i) System.out.println System.out System System.out i String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i = 1; i <= n; i *= 2) if(n < i * 2) System.out.println(i);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i = 1; i <= n; i *= 2) if(n < i * 2) System.out.println(i);
	}
} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i = 1; i <= n; i *= 2) if(n < i * 2) System.out.println(i);
	}
}