#include<stdio.h>
long check(long n,long a,long b){
	if(n>=1e9||n<=1||a>=b||a<0||b>=1e9||b<0)
	{
		if(n==1&&a==b){
			return 1;
		}else return 0;
		
	long t=(n-1)*b+a-(n-1)*a+1;
	printf("%ld\n",t);
	return t;
	}
	
}
int main(){
	long n;long a;long b;
	scanf("%ld",&n);
	scanf("%ld",&a);
	scanf("%ld",&b);
	printf("%d",check(n,a,b));
	return 0;
}