a = float(input())
if a >5000:
    a= a*0.6
elif a>2000:
    a = a*0.7
elif a>500:
    a = a*0.8
elif a>100:
    a = a*0.9
print(f"{a:.1f}")