#include<bits/stdc++.h>
using namespace std;
int main(){
int x;
cin>>x;
if(x<151)printf("%.1f",x*0.4463);
else if(x>150&&x<=400){
printf("%.1f",(x-150)*0.4663+150*0.4463);
}
else if(x>400){
printf("%.1f",(x-400)*0.5663+350*0.4663+150*0.4463);
}
return 0;
}
~~ (不知道咋回事) ~~