#include "math.h"
#include "algorithm"
#include "iostream"
using namespace std;


int main()
{
	int N,A,B;
	scanf("%d %d %d",&N,&A,&B);
	if(A == 1)
	{
		if(A == B)
			printf("1\n");
		else
			printf("0\n");
		return 0;
	}
	if(B < A)
	{
		printf("0\n");
		return  0;
	}
	long long int max,min;
	max = A+B+B*(N-2);
	min = A+B+A*(N-2);
	printf("%lld\n",max-min+1);
	return 0;
}