#include using namespace std; int main() { double x, y; cin >> x >> y; cout << ceil(2 * pow(x * x + y * y + 0.1, 0.5)) << endl; return 0; }