Snuke has N integers. Among them, the smallest is A, and the largest is B. We are interested in the sum of those N integers. How many different possible sums there are?

Constraints

* 1 ≤ N,A,B ≤ 10^9
* A and B are integers.

Input

Input is given from Standard Input in the following format:


N A B


Output

Print the number of the different possible sums.

Examples

Input

4 4 6


Output

5


Input

5 4 3


Output

0


Input

1 7 10


Output

0


Input

1 3 3


Output

1
import java.util.Scanner;

final class Solver {
	static final Solver INSTANCE = new Solver();

	void solve(Scanner sc) {
		int N = sc.nextInt();
		int A = sc.nextInt();
		int B = sc.nextInt();
		if (A > B) {
			System.out.println(0);
			return;
		}
		if (N == 1) {
			System.out.println(A == B ? 1 : 0);
			return;
		}
		long min = Math.addExact(Math.multiplyExact(A, N - 1L), B);
		long max = Math.addExact(Math.multiplyExact(B, N - 1L), A);
		System.out.println(max - min + 1);
	}
}

class Main {
	public static void main(String... args) {
		Scanner in = new Scanner(System.in);

		Solver.INSTANCE.solve(in);

		in.close();
	}
}