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