Line and squares#863

Line and squares

1 second
64 megabytes
Very easy

In a rectangular Cartesian coordinate system, a straight line is given by two points belonging to it: and (100N, E). Also given are N^2 squares with sides parallel to the coordinate axes. The square S_{i,j} has corner coordinates (100i, 100j) and (100i - 100, 100j - 100), where i,j = 1, 2, \ldots, N. You are required to find the number of squares that have at least one common point with the given line.

Input

The first line contains three integers , , and , separated by spaces.

1 \leq N \leq 100, 0 \leq W, E \leq 100N. All numbers are integers.

Output

Output a single integer: the number of squares.

Examples

Example 1

Loading
Loading