#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU X, Y = gets.chomp.split.map(&:to_f) L = (X * X + Y * Y) ** 0.5 if L.ceil == L.floor puts (2 * L.ceil).succ else puts (2 * L.ceil) end