#include <cstdio>
int main()
{
	long long n, min, max;
	scanf("%lld %lld %lld", &n, &min, &max);
	if ((min > max) || (n == 1 && min != max))
	{
		printf("0\n");
		return 0;
	}
	else if (n == 1)
	{
		printf("1\n");
		return 0;
	}
	long long high = min + max * (n - 1);
	long long low = max + min * (n - 1); 
	printf("%lld\n", high - low + 1);
	return 0; 
}