#include <iostream>

using namespace std;

int memo[5001];
void init(){
  fill(memo, memo+5001, 1<<20);
  for(int i = 0; i*200 <= 5000 ; i++){
    for(int j = 0; j*300 <= 5000 ; j++){
      if(i*200+j*300 > 5000)break;
      for(int k = 0; k*500 <= 5000 ; k++){
	if(i*200+j*300+k*500 > 5000)break;
	int sum = i*200+j*300+k*500;
	int m = (i/5)*1520+(i%5)*380 + (j/4)*1870+(j%4)*550 + (k/3)*2244 + (k%3)*850;
	memo[sum] = min(memo[sum], m);
      }
    }
  }
}
int main(){
  int n;
  init();
  while(cin >> n, n){
    cout << memo[n] << endl;
  }
  return 0;
}