#include<stdio.h>
int main(){
int number;
scanf("%d",&number);
float cost=0;
if (number<=150){
cost = 0.4463*number;
}
if (number>150&& number<=400){
cost = 0.4463*150 +0.4663 *(number-150);
}
if (number>400){
cost = 0.4463*150 +0.4663 *250 + 0.5663*(number-400);
}
printf("%.1f", cost);
return 0;
}