#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int g[] = {1500,1200,1000,500,300,200};
int c[] = {2244,1870,1520,850,550,380};

int dp[11][5555];
int solve(int i,int n){
  if(i > 5) return 1<<28;
  if(n <= 0) return 0;
  if(dp[i][n]) return dp[i][n];
  return dp[i][n] = min(solve(i,n-g[i])+c[i],solve(i+1,n));
}

int main(void){
  int n;
  while(cin >> n && n){
    cout << solve(0,n) << endl;
  }
}