#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int Max;

void solve(int n,int k){
  if(n<=0){
    Max=min(k,Max);
    return;
  }
  solve(n-200*5,k+380*0.8*5);
  solve(n-300*4,k+550*0.85*4);
  solve(n-500*3,k+850*0.88*3);
  solve(n-200,k+380);
  solve(n-300,k+550);
  solve(n-500,k+850);
  return;
}

int main(void){
  int n;
  while(cin>>n,n!=0){
    Max=9999999;
    solve(n,0);
    cout<<Max<<endl;
  }
  return 0;
}