#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) int main() { ios_base::sync_with_stdio(0); cin.tie(0); int x, y; cin >> x >> y; int l = 0; while (l * l <= 4 * x * x + 4 * y * y) ++l; cout << l << endl; return 0; }