#include <stdio.h>

int main(void) {

	int a=3,b=0;
	while(b<=10000){
	b=2*a-1;
	a=b;
	}

printf("%dの時初めて10000を超える",b);
	

	return 0;
}
