#include using namespace std; typedef unsigned long long ull; typedef long long ll; int main(){ ll x, y; cin >> x >> y; cout << 1+(int)(2*sqrt(x*x+y*y)) << endl; return 0; }