while True:

 N = int(eval(input()))

 if N==0: break

 ans = float('inf')

 for c200 in range(N//200+1):

  for c300 in range(N//300+1):

   for c500 in range(N//500+1):

    if 200 * c200 + c300 * 300 + c500 * 500 == N:

     ans = min(ans, 1520*(c200//5)+380*(c200%5)+1870*(c300//4)+550*(c300%4)+2244*(c500//3)+850*(c500%3))

 print(ans)

a=[1e4]*51

for i,j in[(2,380),(3,550),(5,850),(10,1520),(12,1870),(15,2244)]:

 a[i]=j

 for k in range(51-i):

  if a[k+i]>a[k]+j:a[k+i]=a[k]+j

for n in iter(input,'0'):print((a[int(n)//100]))

while True:
    N = int(eval(input()))
    if N == 0:
        break
    ans = float("inf")
    for c200 in range(N // 200 + 1):
        for c300 in range(N // 300 + 1):
            for c500 in range(N // 500 + 1):
                if 200 * c200 + c300 * 300 + c500 * 500 == N:
                    ans = min(
                        ans,
                        1520 * (c200 // 5)
                        + 380 * (c200 % 5)
                        + 1870 * (c300 // 4)
                        + 550 * (c300 % 4)
                        + 2244 * (c500 // 3)
                        + 850 * (c500 % 3),
                    )
    print(ans)

a = [1e4] * 51
for i, j in [(2, 380), (3, 550), (5, 850), (10, 1520), (12, 1870), (15, 2244)]:
    a[i] = j
    for k in range(51 - i):
        if a[k + i] > a[k] + j:
            a[k + i] = a[k] + j
for n in iter(input, "0"):
    print((a[int(n) // 100]))

-while True: -    N = int(eval(input())) -    if N == 0: -        break -    ans = float("inf") -    for c200 in range(N // 200 + 1): -        for c300 in range(N // 300 + 1): -            for c500 in range(N // 500 + 1): -                if 200 * c200 + c300 * 300 + c500 * 500 == N: -                    ans = min( -                        ans, -                        1520 * (c200 // 5) -                        + 380 * (c200 % 5) -                        + 1870 * (c300 // 4) -                        + 550 * (c300 % 4) -                        + 2244 * (c500 // 3) -                        + 850 * (c500 % 3), -                    ) -    print(ans) +a = [1e4] * 51 +for i, j in [(2, 380), (3, 550), (5, 850), (10, 1520), (12, 1870), (15, 2244)]: +    a[i] = j +    for k in range(51 - i): +        if a[k + i] > a[k] + j: +            a[k + i] = a[k] + j +for n in iter(input, "0"): +    print((a[int(n) // 100]))