#include <stdio.h>
int main(void)
{
	int x1,x;
	x1=1;
	do
	{
		x=2*x1+1;
		x1=x;
	}
	while(x<=1000);
	printf("%d\n",x);
	return 0;
}