#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); long long x, y; cin >> x >> y; cout << floor(sqrt(x * x + y * y) * 2) + 1 << endl; return 0; }