#include <bits/stdc++.h>
using namespace std;
int main(){
float n,h;
cin>>n;
if (n>=500){
h=n*0.8;
}
else if (n>=300){
h=n*0.9;
}
else {
h=n;
}
printf("%.2f",h);
}
/**************************************************************
Problem: 1871
User: xiaojingxuan
Language: C++
Result: Accepted
Time:21 ms
Memory:2072 kb
****************************************************************/