#include
using namespace std;
int x;
long long res = 0, ans = 0;
int main() {
cin >> x;
int n = x / 100;
int A[n];
int B[n + 1];
if (x < 100) {
cout << x * 2000 << "\n";
return 0;
}
for (int i = 0; i < n; ++i) {
if (i + 1 == 1) {
A[i] = 2000;
B[i] = 2000;
} else if (i + 1 == 2) {
A[i] = 3000;
B[i] = 3000;
} else if (i + 1 == 3) {
A[i] = 5000;
B[i] = 5000;
} else if (i + 1 > 3) {
A[i] = 10000;
B[i] = 10000;
}
res += 100 * A[i];
ans += 100 * B[i];
}
if (x % 100 == 0) {
cout << res << "\n";
return 0;
}
if (B[n - 1] == 2000) B[n] = 3000;
else if (B[n - 1] == 3000) B[n] = 5000;
else if (B[n - 1] == 5000) B[n] = 10000;
else if (B[n - 1] == 10000) B[n] = 10000;
ans += x % 100 * B[n];
cout << ans << "\n";
return 0;
}