#include <iostream>
#include <climits>
using namespace std;

int main(){
  int n;

  while(cin>>n,n){
    int ans = INT_MAX;
    for(int i=0;i*200<=n;i++){
      int aw = i * 200;
      for(int j=0;aw+j*300<=n;j++){
        int bw = j * 300;
        for(int k=0;aw+bw+k*500<=n;k++){
          int cw = k * 500;
          if(aw+bw+cw < n) continue;

          int calA = (i % 5) * 380 + (i / 5) * 5 * 380 * 0.8;
          int calB = (j % 4) * 550 + (j / 4) * 4 * 550 * 0.85;
          int calC = (k % 3) * 850 + (k / 3) * 3 * 850 * 0.88;

          ans = min(ans,calA+calB+calC);
        }
      }
    }

    cout<<ans<<endl;
  }
}