#include<stdio.h>

int main(void){
	int n;
	int w[6] = {200,300,500,1000,1200,1500};
	int p[6] = {380,550,850,1520,1870,2244};
	while(scanf("%d", &n) && n){
		int dp[100001]={0};
		dp[0]=0;
		for(int i = 1;; i++){
			for(int j = 0; j < 6; j++){
				if(i-p[j] < 0)continue;
				if(dp[i] < w[j]+dp[i-p[j]]){
					dp[i] = dp[i-p[j]]+w[j];
				}
			}
			if(dp[i] >= n){
				printf("%d\n",i);
				break;
			}
		}
	}
	return 0;
}