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