#include <iostream>
#include <iomanip>
using namespace std;

int main() {
    
    double price;
    cin >> price;
    double cost = 0.0;
    cost = price;//赋值

    // write your code here.......
    if (cost >=100 && cost <500)
    {
        cost *= 0.9;
    }
    if (cost >= 500 && cost < 2000)
    {
        cost *= 0.8;
    }
    if (cost >=2000 && cost <5000)
    {
        cost *= 0.7;
    }
    else if (cost >= 5000)
    {
        cost *= 0.6;
    }

    cout << setiosflags(ios::fixed) << setprecision(1) << cost << endl;

    return 0;
}