#include<bits/stdc++.h>
#define mk make_pair
using namespace std;
int sum;
set<pair<pair<int,int>,int> >s;
void dfs(int a,int b,int c,int n){
  if(s.count(mk(mk(a,b),c)))return;
  s.insert(mk(mk(a,b),c));
  if(n==0){
    int aa=0,bb=0,cc=0;
    if(a>=5)aa=a/5*1520;
    if(b>=4)bb=b/4*1870;
    if(c>=3)cc=c/3*2244;
    sum=min(sum,aa+bb+cc+a%5*380+b%4*550+c%3*850);
  }
  else{
    if(n-200>=0)dfs(a+1,b,c,n-200);
    if(n-300>=0)dfs(a,b+1,c,n-300);
    if(n-500>=0)dfs(a,b,c+1,n-500);
  }
}
int main(){
  int a;
  while(cin>>a){
    s.clear();
    sum=1e9;
    dfs(0,0,0,a);
    cout<<sum<<endl;
  }
}