#include <bits/stdc++.h>

int main(){
	int n,max,min;
	int count=0;
	int *Data;
	int index;
	scanf("%d",&n);
	scanf("%d",&min);
	scanf("%d",&max);
	
	if(min>max){
		printf("%d",0);
		return 0;
	}
	if(n==1){
		if(min == max){
			printf("%d",1);
			return 0;
		}
		else
		{
			printf("%d",0);
			return 0;
		}
	}
	if(n==2){
		if(min == max){
			printf("%d",2);
			return 0;
		}
		else{
			printf("%d",1);
			return 0;
		}
	}
	index= min+max+(min*(n-2));
	count = min+max +(max*(n-2));
	printf("%d",count-index+1);
	 
	
	
	
	return 0;
}