x,y = gets.split.map(&:to_i) d = Math.sqrt(x*x + y*y) puts (d*2+1).floor