double t,s;main(a,b){for(;~scanf("%d%d",&a,&b);s=!printf("%.f\n",s))for(t=1.57077;t>0;t-=5e-5)s+=hypot(a*sin(t),b*cos(t))/5e3;}