#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
	double n,a,b,res = 0;
	cin >> n >> a >> b;

	if(a == 0 || b == 0)
		printf("%.0f",res);
	else if(a > b)
	{
		printf("%.0f",res);
	}
	else if(n == 1 && a == b)
	{
		printf("%.0f",n);
	}
	else if(n == 1 && a != b)
		printf("%.0f",res);
	else
	{
		int min = (n - 1) * a + b;
		int max = (n - 1) * b + a;
		printf("%.0f",max - min + 1); 
	}

    return 0;
}