404349: GYM101484 J Beautiful Triangles

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

J. Beautiful Trianglestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Sancho loves geometry. And he loves triangles even more, to the point of developing his own metric of beauty for triangles. In his metric, the beauty of a triangle is calculated by subtracting the length of the largest side from the sum of the lengths of the other two sides.

During weekends, Sancho likes to walk by the beach looking for straight sticks to build his triangles. He has already found 2 sticks and he's very optimistic about the triangle he's going to build.

He wants to know what should be the length of the third stick so that the beauty of his triangle is maximized. Help him with this task!

Input

The input consists of a single line, containing two integers l1 and l2 (1 ≤ l1, l2 ≤ 2 × 109) indicating the length of the sticks that Sancho has already found.

Output

Output a single integer: the length of the third stick that maximizes the beauty of the triangle that Sancho is going to build.

ExampleInput
5 5
Output
5

Source/Category

加入题单

算法标签: