#coding:utf-8 from math import sqrt,fabs x,y=map(int,raw_input().split()) print int(sqrt(fabs(pow(x,2)+pow(y,2)))*2+1)