#include #include using namespace std; int main() { int a, b; cin >> a >> b; cout << floor(sqrt(a * a + b * b)) * 2 + 1 << endl; }