#include using namespace std; int main() { double xp, yp; cin >> xp >> yp; double ans = sqrt(xp * xp + yp * yp) * 2; if(xp == yp){ cout << ans << endl; }else{ cout << ans + 1 << endl; } }