#include <iostream>
#include <iomanip>
using namespace std;
int main() {
long long N;
if (!(cin >> N)) return 0;
double tien_truoc_thue = 0;
// Bậc 1: 0 - 100 kWh (Tối đa 100 kWh)
if (N > 100) {
tien_truoc_thue += 100 * 2000;
N -= 100;
} else {
tien_truoc_thue += N * 2000;
N = 0;
}
// Bậc 2: 101 - 200 kWh (Tối đa 100 kWh)
if (N > 100) {
tien_truoc_thue += 100 * 2500;
N -= 100;
} else {
tien_truoc_thue += N * 2500;
N = 0;
}
// Bậc 3: 201 - 400 kWh (Tối đa 200 kWh)
if (N > 200) {
tien_truoc_thue += 200 * 3000;
N -= 200;
} else {
tien_truoc_thue += N * 3000;
N = 0;
}
// Bậc 4: 401 - 700 kWh (Tối đa 300 kWh)
if (N > 300) {
tien_truoc_thue += 300 * 3600;
N -= 300;
} else {
tien_truoc_thue += N * 3600;
N = 0;
}
// Bậc 5: Từ 701 kWh trở lên
if (N > 0) {
tien_truoc_thue += N * 4000;
}
// Cộng thêm 8% thuế VAT
double tong_tien = tien_truoc_thue * 1.08;
// In kết quả, định dạng lấy 2 chữ số thập phân nếu đề bài yêu cầu số thực
cout << fixed << setprecision(2) << tong_tien << endl;
return 0;
}