#coding: utf-8 ##yuki_98 import math s=[] s=map(int,raw_input().split()) x=s[0] y=s[1] d=int(math.ceil(2*(math.sqrt(x**2+y**2))+0.00001)) print d