#include<iostream>
#include<algorithm>
#define rep(i,a,b) for(int i=a;i<b;i++)
using namespace std;
int main(){
	int d[60],x;
	rep(i,0,60)d[i]=9999;
	rep(i,0,30)d[i*2]=380*i-380*(i/5);
	rep(i,0,55){
		rep(j,0,(55-i)/3){
			d[j*3+i]=min(d[j*3+i],d[i]+j*550-330*(j/4));
		}
	}
	rep(i,0,55){
		rep(j,0,(55-i)/5){
			d[j*5+i]=min(d[j*5+i],d[i]+j*850-306*(j/3));
		}
	}
	while(cin>>x&&x){
		cout<<d[x/100]<<endl;
	}
	return 0;
}