#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){

	int quan;
	while(cin>>quan&&quan!=0){
		int minCost=100000000;
		for(int i = 0; i <= 25; i++){
			for(int j = 0; j <= 17; j++){
				for(int k = 0; k <= 10; k++){
					if(i*200+j*300+k*500==quan){
						int il=i%5;
						int jl=j%4;
						int kl=k%3;
						int sum=(i-il)*380*0.8+il*380;
						sum+=(j-jl)*550*0.85+jl*550;
						sum+=(k-kl)*850*0.88+kl*850;
						minCost=min(minCost,sum);
					}
				}
			}
		}
		cout<<minCost<<endl;
	}

	return 0;
}