#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for( int i = 0; i < n; i++ )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 1000000000
#define mod 1000000007
#define INF2 1000000000000000000

int dp[7][60001];

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int price,weight;
    int w[6] = {2, 3, 5, 10, 12, 15};
    int v[6] = {380, 550, 850, 1520, 1870, 2244};

    fill(dp[0], dp[0] + 60001, 0);
    dp[0][0] = 0;
    for (int i = 0; i < 6; i++) {
        for (int j = 0; j <= 60000; j++) {
            if (j < v[i]) {
                dp[i + 1][j] = dp[i][j];
            } else {
                dp[i + 1][j] = max(dp[i][j], dp[i + 1][j - v[i]] + w[i]);
            }
        }
    }
    int m[51];
    fill(m, m+51, INF);
    for (int j = 0; j <= 20000; j++) {
        if (dp[5][j] != INF) {
            //printf("%d:%d\n", dp[5][j]*100, j);
        }
        if (dp[5][j] <= 50) {
            m[dp[5][j]] = min(m[dp[5][j]], j);   
        }   
    }
    /*
    for (int i = 0; i <= 50; i++) {
        printf("%d:%d\n", i*100, m[i]);
    }
    //*/

    cin >> weight;
    while (weight != 0) {
        cout << m[weight/100] << endl;
        cin >> weight;
    }
    
    return 0;
}