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