input = gets.split(" ").map(&:to_i) puts (Math.sqrt(input[0] ** 2 + input[1] ** 2) * 2 + 1).floor