#GYM104609J. Cranes

Cranes

Description

There are $m + 1$ positions located along a straight line, numbered by integers from $0$ to $m$ inclusive. The task is to move all the boxes from one position to another. You are allowed to use $n$ cranes. Initially, all the cranes are in position $0$. Each second, each crane can either stay on its current position or move to an adjacent position to the left or to the right. Each crane can either be empty or hold a single box. The time required to attach the box to the crane or to detach it is negligible.

Find the minimum possible time required to move all $k$ boxes from position $0$ to position $m$. Each position can contain any number of boxes. The movement of cranes and boxes does not interfere with each other.

The input consists of a single line containing three integers $n$, $m$, and $k$ $(1 \le n, m, k \le 10^5)$.

Output a single integer: the number of seconds required to move all $k$ boxes from position 0 to position $m$.

Input

The input consists of a single line containing three integers $n$, $m$, and $k$ $(1 \le n, m, k \le 10^5)$.

Output

Output a single integer: the number of seconds required to move all $k$ boxes from position 0 to position $m$.

1 10 5
5 10 5
90
10