#include <stdio.h>

int main(void) {
	int n, a;

	scanf("%d", &n);

	a = 1;
	while (a < n) {
		a *= 2;
	}

	printf("%d\n", a);

	return 0;
}
