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

const int MAXW = 6000;
const int INF = 1<<28;
const int V[6] = {380,550,850,380*5*0.8,550*4*0.85,850*3*0.88};
const int W[6] = {200,300,500,200*5,300*4,500*3};

int dp[MAXW];
int w;

int main() {
  fill(dp, dp+MAXW, INF);
  dp[0] = 0;
  for(int i = 0; i < 6; ++i) {
    for(int j = W[i]; j < MAXW; ++j) {
      dp[j] = min(dp[j], dp[j-W[i]]+V[i]);
    }
  }
  while(cin >> w && w) {
    cout << dp[w] << endl;
  }
  return 0;
}