#include using namespace std; int main(){ double x,y; cin>>x>>y; double h=hypot(x,y); cout<<(int)(h*2)+1<