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