#include <stdio.h>

int main(void) {
	int a=3,b=1;
	while(b<=10000)
	{
		b = 2 * a - 1;
	    a=b;
     }
	printf("%d",b);
	return 0;
}