#include<cstdio>
int main(){
 long long n,a,b;
scanf("%lld%lld%lld",&n,&a,&b);
if(a > b)
return 0*printf("0\n");
if(n == 1 && a < b)
return 0*printf("0\n");
printf("%lld\n",a+b*(n-1)-(b+a*(n-1))+1);
return 0;
}