#include <stdio.h>
int main()
{
float money;
scanf("%f", &money);
if (money >= 5000)
{
money = 0.6 * money;
}
else if (money >= 2000)
{
money = 0.7 * money;
}
else if (money >= 500)
{
money = 0.8 * money;
}
else if (money >= 100)
{
money = 0.9 * money;
}
printf("%.1f", money);
return 0;
}