#include<iostream> int main(){ double a; scanf("%lf",&a); if(a>=10000) printf("%.2lf",a*0.05); else if(a>=5000) printf("%.2lf",a*0.03); else if(a>=1000) printf("%.2lf",a*0.02); else printf("%.2lf",0); return 0; }