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