P23677 [AtCoder] Premium Membership
入门
题目描述

Problem Description

Niconico Video has a premium membership system. By paying a fixed monthly fee, users can join this premium membership.

Niwango-kun has been a premium member for $ n $ consecutive months. He also knows that the fixed monthly payment changed from $ 525 $ yen to $ 540 $ yen $ x $ months ago. This means that for the most recent $ x $ months out of these $ n $ months, he paid $ 540 $ yen per month, and for the remaining months, he paid $ 525 $ yen per month.

Given $ n $ and $ x $, output the total amount that Niwango-kun has paid for the premium membership over these $ n $ months.

Input Format

The input is given from the standard input in the following format:

$ n $ $ x $

  • The first line contains an integer $n\ (1 \leq n \leq 100)$, representing the number of months Niwango-kun has been a premium member.
  • The second line contains an integer $x\ (1 \leq x \leq n)$, representing the number of months since the fixed monthly payment changed.

Output Format

Output one line containing the total amount that Niwango-kun has paid for the premium membership.

Note that omitting the newline at the end of the line will result in an incorrect answer.

Sample Input and Output

Sample Input #1

5
2

Sample Output #1

2655

Sample Input #2

25
25

Sample Output #2

13500

Sample Input #3

100
1

Sample Output #3

52515

Sample Input #4

1
1

Sample Output #4

540

Notes/Hints

Sample Explanation 1

Out of the $ 5 $ months, it is known that $ 2 $ months were paid at $ 540 $ yen. The remaining $ 3 $ months were paid at $ 525 $ yen, so the total amount paid is $540 \times 2 + 525 \times 3 = 2655$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
5 2
样例输出
2655