package SE50T;
import java.util.Scanner;
/*
* 【Program 12
Topic: The bonuses issued by enterprises are based on the commission of profits. When the profit x is less than or equal to RMB 100,000, the bonus can be increased by 10%.
If the profit is higher than 100,000 yuan and less than 200,000 yuan, the commission of the part above 100,000 yuan can be 7.5%;
When it is between 200,000 and 400,000, the commission of the part above 200,000 yuan can be 5%;
For parts that are more than 400,000 yuan from 400,000 to 600,000 yuan, a commission of 3% can be raised;
When the price is between 600,000 and 1 million, the commission of the part above 600,000 yuan can be 1.5%.
When it is above 1 million yuan, the part that exceeds 1 million yuan will be charged a 1% commission. Enter the monthly profit x from the keyboard to find the total number of bonuses to be paid?
Program analysis: Please use the number axis to demarcate and locate. Pay attention to the definition of bonuses and grow integers.
*/
public class T12 {
public static void main(String[] args) {
Scanner scanner =new Scanner(System.in);
long x = scanner.nextLong();
long money;
if (x < 100000) {
money = (long) (0.1*x);
System.out.println(money);
}else if (x>100000 && x <=200000) {
money = (long) ((x-100000)*0.075 + 0.1*100000);
System.out.println(money);
}else if (x>200000 && x <= 400000) {
money = (long) ((x-200000)*0.05 + 0.075*100000 + 0.1*100000);
System.out.println(money);
}else if (x>400000 && x <= 600000) {
money = (long) ((x-400000)*0.03 + 200000*0.05 + 0.075*100000 + 0.1*100000);
System.out.println(money);
}else if (x>600000 && x <= 1000000) {
money = (long) ((x-600000)*0.015 + 200000*0.03 + 200000*0.05 + 100000*0.075 + 0.1*100000);
System.out.println(money);
}else if (x >= 1000000) {
money = (long) ((x-1000000)*0.01 + 400000*0.015 + 200000*0.03 + 200000*0.05 + 100000*0.075 + 0.1*100000);
System.out.println(money);
}
}
}