#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
double s;
cin >> n;
if(n <= 150)
{
s = 0.4463 * n;
}
if(n >= 151 && n <= 400)
{
s = 0.4463 * 150 +
(n - 150) * 0.4663;
}
else
{
s = 0.4463 * 150 + (400 - 150) * 0.4663
+(n - 400) * 0.5663;
}
printf("%.1f",s);
return 0;
}