P23729 [AtCoder] [ABC031A] Game
入门
题目描述

Problem Description

Takahashi has just bought a new game.

His game character has fixed attack and defense values, and when the character levels up, he can increase either the attack or defense by 1.

Takahashi chooses to increase either the attack or defense to maximize the product of the attack and defense values. If both choices result in the same product after leveling up, he chooses to increase the attack value.

Determine the product of the attack and defense values after Takahashi levels up his character.

Input Format

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

$ A $ $ D $

  • The first line contains two integers $A\ (1≦A≦200)$, $D\ (1≦D≦200)$ separated by a space. This indicates that the attack value of the game character is $ A $ and the defense value is $ D $.

Output Format

Output the product of the attack and defense values of the game character after Takahashi levels it up on a single line.

Ensure to include a newline at the end of the output.

Sample Input and Output

Sample Input #1

31 87

Sample Output #1

2784

Sample Input #2

101 65

Sample Output #2

6666

Sample Input #3

3 3

Sample Output #3

12

Notes/Hints

Sample Explanation 1

Before leveling up, Takahashi's character has an attack value of $ 31 $ and a defense value of $ 87 $.
- If the attack value is increased, the product of the attack and defense values becomes $ (31+1) $ × $ 87 $ = $ 2784 $.
- If the defense value is increased, the product of the attack and defense values becomes $ 31 $ × $ (87+1) $ = $ 2728 $.
Takahashi chooses to increase the attack value, so the product of the attack and defense values after leveling up is $ 2784 $.

Sample Explanation 2

In this case, Takahashi increases the defense value.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
31 87
样例输出
2784