#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include <sstream>
 
#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	int s;
	int max_n = 26;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	std::cin.rdbuf(ifs.rdbuf());
#endif

	while(std::cin >> s){
		if(s == 0){ break; }
		int min_val = 1000000000;

		for(int a = 0; a < max_n; a++){
			if(200 * a > s){ break; }
			for(int b = 0; b < max_n; b++){
				if(200 * a + 300 * b > s){ 
					break;
				}
				for(int c = 0; c < max_n; c++){
					if(200 * a + 300 * b + 500 * c > s){
						break;
					}
					if(200 * a + 300 * b + 500 * c == s){
						int val = 380 * 0.8 * (a - a % 5) + 380 * (a % 5) +
							550 * 0.85 * (b - b % 4) + 550 * (b % 4) +
							850 * 0.88 * (c - c % 3) + 850 * (c % 3);
						min_val = std::min(min_val, val);
					}
				}
			}
		}
		
		std::cout << min_val << std::endl;
	}


#if INPUT_FROM_FILE
		//fclose(fp);
#endif
	return 0;
}

