while n = gets.to_i
  break if n == 0
  min = 1.0/0.0
  0.upto(n/200){|i|
    0.upto(n/300){|j|
      break if 200*i+300*j > n
      if (n - 200*i-300*j) % 500 == 0
        k = (n - 200*i-300*j) / 500
        cost = i % 5 * 380 + (380 * 0.80) * (i - i % 5) \
        + j % 4 * 550 + (550 * 0.85) * (j - j % 4) \
        + k % 3 * 850 + (880 * 0.88) * (k - k % 3)
        min = cost if cost < min
      end
    }
  }
  puts min.to_i
end