import java.util.Scanner;
public class IfElseDemo {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
double xf=scan.nextDouble();
if(xf<=500){
xf=xf*0.98;
}else if(xf<=800){
xf=xf*0.9;
}else{
xf=xf*0.8;
}System.out.println("消费为"+xf);
}
}
//这里需要我们在控制台输入任意数字进行判断