s = gets.split x = s[0].to_i y = s[1].to_i puts ((Math.sqrt(x * x + y * y) + 0.5) * 2).to_i