#include <iostream>
#include <cstdio>
#include <climits>
using namespace std;

#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
int main() {
	while(1) {
		int m;
		cin >> m;
		if(m == 0) break;
		m /= 100;
		int ret = INT_MAX;
		rep(i,m/2+1) {
			rep(j,m/3+1) {
				rep(k,m/5+1) {
					if(i * 2 + j * 3 + k * 5 == m) {
						int sum = 0;
						sum += i * 380 + j * 550 + k * 850;
						sum -= i / 5 * (int) (380 * 5 * 0.2) + j / 4 * (int) (550 * 4 * 0.15)
							+ k / 3 * (int) (850 * 3 * 0.12);
						if(sum < ret) {
							ret = sum;
						}
					}
				}
			}
		}
		cout << ret << endl;
	}
	return 0;
}