#include<iostream>
using namespace std;
int main()
{
	int N, A, B;
	cin >> N >> A >> B;
	if (N==1)
	{
		if (A == B)cout << 1;
		else cout << '0';
	}
	else
	{
		if (A <= B)
		{
			long long minn, maxn;
			maxn = (long long)A + (N - 1)*B;
			minn = (long long)(N - 1)*A + B;
			cout << maxn - minn + 1;
		}
		else
	       cout << '0';
	}
	return 0;
}