#GYM104777M. Treasure Chest

Treasure Chest

Description

Monocarp has found a treasure map. The map represents the treasure location as an OX axis. Monocarp is at $0$, the treasure chest is at $x$, the key to the chest is at $y$.

Obviously, Monocarp wants to open the chest. He can perform the following actions:

  • go $1$ to the left or $1$ to the right (spending $1$ second);
  • pick the key or the chest up if he is in the same point as that object (spending $0$ seconds);
  • put the chest down in his current point (spending $0$ seconds);
  • open the chest if he's in the same point as the chest and has picked the key up (spending $0$ seconds).

Monocarp can carry the chest, but the chest is pretty heavy. He knows that he can carry it for at most $k$ seconds in total (putting it down and picking it back up doesn't reset his stamina).

What's the smallest time required for Monocarp to open the chest?

The only line contains three integers $x, y$ and $k$ ($1 \le x, y \le 100$; $x \neq y$; $0 \le k \le 100$) — the initial point of the chest, the point where the key is located, and the maximum time Monocarp can carry the chest for.

Print a single integer — the smallest time required for Monocarp to open the chest.

Input

The only line contains three integers $x, y$ and $k$ ($1 \le x, y \le 100$; $x \neq y$; $0 \le k \le 100$) — the initial point of the chest, the point where the key is located, and the maximum time Monocarp can carry the chest for.

Output

Print a single integer — the smallest time required for Monocarp to open the chest.

5 7 2
10 5 0
7
10