#include<stdio.h> 
#include<vector>
#include<set>
#include<string>
#include<iostream>
using namespace std;

 

int main(){
 int n,a,b;
 cin>>n>>a>>b;
 if(a>b||a-b>n){
 printf("0");
 return 0;
 }
 if(a==b&&n==1){
 	printf("1");
 return 0;
 }
 int small=a+b+(n-2)*a;
 int large=(a+b)+(n-2)*b;
 printf("%d",large-small+1);
 return 0; 
}