#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<iostream>
#include<string>
using namespace std;
#define INF (1<<29)
int N;
bool ok(int a,int b,int c){
  if(a*200+b*300+c*500==N) return true;
  return false;
}
int calc(int a,int b,int c){
  return a*380-(a/5)*380 + b*550-(b/4)*330 + c*850-(c/3)*306;
}
int main(){
  while(scanf("%d",&N),N){
    int res = INF;
    for(int a=0;a<251;a++){
      for(int b=0;b<200;b++){
	for(int c=0;c<101;c++){
	  if(ok(a,b,c))
	    res = min(res,calc(a,b,c));
	}
      }
    }
    printf("%d\n",res);
  }
}