a;main(b){scanf("%d%d",&a,&b);a=!printf("%d",a=sqrt(a*a+b*b)*2+1);}