#include <stdio.h>

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