#include<iostream>
using namespace std;
int main() {
    int G;
    //cin >> G;
    while(1) {
    int ans = 10000000;
    cin >> G;
    if (G==0)break;
    for (int a = 0; a <= 25; ++a){
      for (int b = 0; b <= 16; ++b){
	for (int c = 0; c <= 10; ++c){
	  
	  int k = 200 * a + 300 * b + 500 * c;
	  if (k != G) continue;
	  
	  // cout << a << " " << b << " " << c << endl; 
	  int s = a % 5;
	  int S = a - s;
	  int x = 380 * 0.8 * S + 380 * s;

	  int t = b % 4;
	  int T = b - t;
	  int y = 550 * 0.85 * T + 550 * t;

	  int u = c % 3;
	  int U = c - u;
	  int z = 850 * 0.88 * U + 850 * u;

	  int g = x + y + z;

          //int h[] = {g};
          //int min = h[0];
          //for (int i = 0; i < 10000000; i++){
	  //  if (h[i] < min)
	  //    min = h[i];
	  //}
	  //cout << min << endl;
	  // もしgがansより小さければansをgに書き換える
	  if (g < ans){
	    ans = g;
	      }
	    }
          }
        }
      cout << ans << endl;  
    }
  return 0;
}
    
    
 

