def r m, a, b, c
  return if m < 0
  if m == 0
    p = 0;
    k = a % 5; p += 380 * k + (380 * (a - k) * 0.80).to_i;
    k = b % 4; p += 550 * k + (550 * (b - k) * 0.85).to_i;
    k = c % 3; p += 850 * k + (850 * (c - k) * 0.88).to_i;
    return p
  end
  s = []
  if m >= 200
    s.push r(m - 200, a + 1, b, c)
  end
  if m >= 300
    s.push r(m - 300, a, b + 1, c)
  end
  if m >= 500
    s.push r(m - 500, a, b, c + 1)
  end
  return s.select{|a|a}.min
end

while 0 < m = gets.to_i
  p r(m, 0, 0, 0)
end