#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int main(){
  int g;
  
  /*
  cout << 380*5*0.80 << endl;
  cout << 550*4*0.85 << endl;
  cout << 850*3*0.88 << endl;
  
  cout << 380*15 << endl;
  cout << 550*10 << endl;
  cout << 850*6 << endl;*/

  int ans;

  while(cin >> g, g){
    ans = 0;
    while(g != 0){
      
      if(g >= 2700){
	ans += 4014;
	g -= 2700;
      }
      
      else if(g >= 2500){
	ans += 3764;
	g -= 2500;
      }
  
      else if(g >= 2200){
	ans += 3390;
	g -= 2200;
      }
      
      else if(g >= 1500){
	ans += 2244;
	g -= 1500;
      }
      else if(g >= 1200){
	ans += 1870;
	g -= 1200;
      }
      else if(g >= 1000){
	ans += 1520;
	g -= 1000;
      }
      else if(g >= 500){
	ans += 850;
	g -= 500;
      }
      else if(g >= 300){
	ans += 550;
	g -= 300;
      }
      else if(g >= 200){
	ans += 380;
	g -= 200;
      }
    }
    cout << ans << endl;
  }
  return 0;
}