a, b, c = gets.split(" ").map &:to_i d = Math.sqrt(4*a*a - 12*b) e1 = (d - 2 * a) / 6 e2 = (-1 * d - 2 * a) / 6 inf = 10**9 [[-1*inf, e2], [e2, e1], [e1, inf]].each_with_index do |ar, idx| l = ar[0].to_f.floor r = ar[1].to_f.ceil while(r-l > 1) do mid = (l + r) / 2 f = ((mid + a) * mid + b) * mid + c f *= -1 if idx == 1 case f <=> 0 when 0 puts mid break; when -1 l = mid else r = mid end end end