#include<iostream>

using namespace std;

int main()
{
	int n, a, b;
	cin >> n >> a >> b;
	if (a > b)cout << "0";
	else if (a == b && n > 1)cout << "0";
	else if (a < b&&n < 2) cout << "0";
	else
	{
		int k = n - 2;
		cout << b * k - a * k + 1;
	}
	return EXIT_SUCCESS;
}