x,y=map(int,input().split()) z=(x**2+y**2)**0.5 import math print(2*math.floor(z)+1)