#include <iostream> #include <vector> #include <cstdio> #include <sstream> #include <map> #include <string> #include <algorithm> #include <queue> #include <cmath> using namespace std; int main(){ int x,y; cin >> x >> y; cout << ceil( sqrt(x*x + y*y) *2 + 1e-6) << endl; return 0; }