#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
	int g,a,b,c,m,mg;
	while(cin >> g) {
		if (g==0) break;
		mg=9999999;
		for (a=0;a<26;a++) for (b=0;b<17;b++) for (c=0;c<51;c++) {
			if (a*200+b*300+c*500!=g) continue;
            m=(a/5)*1520+(a%5)*380+(b/4)*1870+(b%4)*550+(c/3)*2244+(c%3)*850;
			mg=(mg > m) ? m : mg;
		}
    cout << mg << endl;
	}
    return 0;
	}