#include inline long nextInt(void) { long temp; std::cin >> temp; return temp; } int main() { int x, y; std::cin >> x >> y; std::cout << 1 + (int)(2 * sqrt( x * x + y * y )) << std::endl; return 0; }