#include<bits/stdc++.h>
using namespace std;
int main(){
int a;
float b;
cin>>a;
if(a<=150){
b=a*0.4463;
}
if(a>=151&&a<=400){
b=b+150*0.4463+(a-150)*0.4663;
}
else{
b=b+150*0.4463+(400-150)*0.4663+(a-400)*0.5663;
}
cout<<fixed<<setprecision(1)<<b;
return 0;
}