#include #include using namespace std; int main(){ int x, y; cin >> x >> y; cout << (int)(2*sqrt( x*x + y*y )+1) << endl; return 0; }