/*
	0106:Discounts of Buckwheat
*/
#include	<iostream>
#include	<cstdio>
#include	<cmath>
#define _INF 20000000

using namespace std;

int main(void) {
	while(1) {
		int minPrise = _INF, target_g;
		
		cin >> target_g;
		if(target_g == 0) { break; }
		for(int a = 0; a < 26; a++) {
			for(int b = 0; b < 17; b++) {
				for(int c = 0; c < 11; c++) {
					int buf = 0;
					
					if((200*a) + (300*b) + (500*c) != target_g) { continue; }
					buf += 380*(a-a%5)*0.80+380*(a%5);
					buf += 550*(b-b%4)*0.85+550*(b%4);
					buf += 850*(c-c%3)*0.88+850*(c%3);
					minPrise = min(minPrise, buf);
				}
			}
		}
		cout << minPrise << endl;
	}
	return 0;
}