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

int main() {
    
    double price;
    scanf("%lf",&price);
    float count=0.0;
    if(price>=100){
        count=0.9;
        if(price>=500){
            count=0.8;
            if(price>=2000){
                count=0.7;
                if(price>=5000){
                    count=0.6;
                }
            }
        }
    }
    printf("%.1f",price*count);
    return 0;
}