#P127. [KSC004A] 2A+2B Problem

[KSC004A] 2A+2B Problem

Source

This problem is adapted from Long Long OJ. All rights reserved.

Problem Description

Little A has two sticks of length aa and little B has two sticks of length bb.

Determine how many distinct lengths can be formed by combining their sticks (not all sticks need to be used).

Input Format

One line containing two non-negative integers aa and bb, separated by a space.

Output Format

The number of distinct lengths that can be formed using the four sticks (not all need to be used).

Samples

2 2
5
2 3
9

Sample 2 Explanation

Possible lengths formed: 0,2,3,4,5,6,7,8,100, 2, 3, 4, 5, 6, 7, 8, 10.

Data Range

0a,b10180 \le a, b \le 10^{18}.