x;main(y){scanf("%d%d",&x,&y);printf("%d\n",x=ceil(sqrt(x*x+y*y)*2+1e-6));exit(0);}