#include #include int main(void) { int Xp, Yp; scanf("%d %d", &Xp, &Yp); printf("%d\n", (int)(2 * sqrt(Xp * Xp + Yp * Yp)) + 1); return 0; }