import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); double money=sc.nextDouble(); if(money>=5000){ System.out.printf("%.1f",money*0.6); }else if(money>=2000) { System.out.printf("%.1f",money*0.7); }else if(money>=500) { System.out.printf("%.1f",money*0.8); }else if(money>=100) { System.out.printf("%.1f",money*0.9); }else if(money>=0) { System.out.printf("%.1f",money); } } }