#include <cstdio>
#include <algorithm>

using namespace std;

const int ma = 1000000000;

///割引された値を単位に考える。→　余りを最安値で買う。(2変数)
///3変数では不可。→　全探索。

int main()
{
    while( 1 )
    {
        int n;
        scanf( "%d\n", &n );
        if( n == 0 )break;
        int mini = ma, num_a, num_b, num_c, index;
        for( int a = 0; a <= n; a+= 200 )
        {
            for( int b = 0; b <= n; b+= 300 )
            {
                if( a + b > n )break;
                for( int c = 0; c <= n; c += 500 )
                {
                    if( a + b + c > n ) break;
                    if( a + b + c == n )
                    {
                        num_a = a / 200;
                        num_b = b / 300;
                        num_c = c / 500;
					    index = 380*(num_a%5)+550*(num_b%4)+850*(num_c%3)+304*(num_a - num_a%5)+1870*(num_b-num_b%4)/4+748*(num_c-num_c%3);
                        mini = min( mini, index );
                    }
                }
            }
        }
        printf( "%d\n", mini );
    }
    return 0;
}

