#include <cstdio>

int main(){
	int n, ans;
	while(scanf("%d", &n),n){
		ans = 100000000;
		for(int i = 0; i <= 25; i++){
			for(int j = 0; j <= 20; j++){
				for(int k = 0; k <= 10; k++){
					if(i*200+j*300+k*500==n){
						int tmp;
						tmp = i*380+j*550+k*850-(i/5)*5*380*20/100-(j/4)*4*550*15/100-(k/3)*850*3*12/100;
						if(ans > tmp) ans = tmp;
					}
				}
			}
		}
		printf("%d\n", ans);
	}
}