#include using namespace std; int main(){ int x,y; cin>>x>>y; int d = 4*(x*x+y*y); cout << (int)sqrt(d) + 1 << endl; }