#include<stdio.h>
#include<iostream>
#include<string>
#include<algorithm>
#include <vector>
#include<math.h>
#include<iomanip>
#include<set>


using namespace std;

int main(){

	int x[500]={};
	x[1]=380;
	x[2]=380;
	for(int i=1;i<60;i++){
		x[i+2]=x[i]+380;
	}
	
	
	
	x[3]=550;x[5]=850;
	int RR=380*5*0.8;
	x[10]=RR;
	RR=550*4*0.85;
	x[12]=RR;
	RR=850*3*0.88;
	x[15]=RR;
	for(int i=2;i<60;i++){
		if(x[i+2]>x[i]+380)x[i+2]=x[i]+380;
		if(x[i+3]>x[i]+550)x[i+3]=x[i]+550;
		if(x[i+5]>x[i]+850)x[i+5]=x[i]+850;

		int R=380*5*0.8;
		if(x[i+10]>x[i]+R)x[i+10]=x[i]+R;
		R=550*4*0.85;
		if(x[i+12]>x[i]+R)x[i+12]=x[i]+R;
		R=850*3*0.88;
		if(x[i+15]>x[i]+R)x[i+15]=x[i]+R;
	}

	


	int n;
	double S=0;
	while(1){
		S=0;
		cin>>n;if(!n)return 0;
		/*
		while(n>0){
			if(n>=1500){
				n-=1500;S+=850*3*0.88;
			}
			else if(n>=1200){
				n-=1200;S+=550*4*0.85;
			}
			else if(n>=1000){
				n-=1000;S+=380*5*0.8;
			}
			else if(n>=500){
				n-=500;S+=850;
			}
			else if(n>=400){
				n-=400;S+=380;
			}
			else if(n>=300){
				n-=300;S+=550;
			}
			else {
				n-=200;S+=380;
			}
			cout<<n;
		}
		*/
		n/=100;
		cout<<x[n]<<endl;
	}
	return 0;
}