#include<iostream>
using namespace std;
int main()
{
    int n,m,asum,bsum,csum,sum,a,b,c;
    while(cin >> n,n!=0){
        int mi = 1000010;
        for(int i=0;i<=n;i+=200){
            for(int j=0;j<=n-i;j+=300){
                int k=n-i-j;
                if(k%500 != 0) continue;
                asum = i/200;
                bsum = j/300;
                csum = k/500;
                sum = 380*(asum-asum%5)*80/100 + 380*(asum%5);
                sum += 550*(bsum-bsum%4)*85/100 + 550*(bsum%4);
                sum += 850*(csum-csum%3)*88/100 + 850*(csum%3);
                mi = min(mi,sum);
            }
        }
        cout << mi << endl;
    }
    return 0;
}

