Ground Is Lava


Windra has just won gold in the Olympic pole vault, and in the rush of excitement they leave the stadium still carrying their pole. Then they hear that their long-lost brother Bindra is waiting somewhere in the Olympic village. Windra starts at point aa, Bindra is at point bb, and every point in the village is represented by an integer on a number line.

Windra can move in two ways:

  • For every integer xx, they may walk between points xx and x+1x+1.
  • For every integer xx, there are vault pads at points kxkx and k(x+1)k(x+1), and Windra may use the pole to launch between these two points.

Each walk or vault takes exactly one minute.

Given kk, aa, and bb, find the minimum number of minutes Windra needs to reach Bindra.

Input

The only line contains three integers kk, aa, and bb (1≤k≤1091 \leq k \leq 10^9, −109≤a,b≤109-10^9 \leq a, b \leq 10^9), in this order.

Output

Print one integer: the minimum number of minutes needed to get from point aa to point bb.

Example 1

Input 1
4 1 10
Output 1
5
Explanation

In the sample, one optimal route is:

1→0→4→8→9→10.1 \to 0 \to 4 \to 8 \to 9 \to 10.

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.