#include #include #include using namespace std; int main() { double x,y,num; cin >> x >> y; num=sqrt(x*x+y*y); cout << ceil(num)*2 << endl; }