P28601 [洛谷] zzc Farming
普及
题目描述

Problem Background

zzc might end up farming in the future.

Problem Description

The field is a large rectangle. However, zzc can only plant a square at a time, and the stamina cost for planting a square is equal to the square's perimeter. Once planted, a field cannot be replanted. zzc is lazy and wants to save stamina for other activities, so he wants to finish planting the field with the least amount of stamina. Determine the minimum stamina required.

Input Format

Two positive integers $x, y$, representing the length and width of the field.

Output Format

Output the minimum stamina required.

Sample Input and Output

Sample Input #1

1 10

Sample Output #1

40

Sample Input #2

2 2

Sample Output #2

8

Notes

$1 \le x, y \le 10^{16}$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 10
样例输出
40