#include<stdio.h>
int main()
{
    int N,A,B;
    while(scanf("%d%d%d",&N,&A,&B)!=EOF)
    {
        if(A>B)
            printf("0\n");
        else if((B-A)>N)
            printf("0\n");
        else if(A==B)
            printf("%d\n",A*N);
            else {
                long long x = (N-1)*B+A;
            long long x1 = (N-1)*A+B;
                long long count1 =x-x1+1;
                printf("%lld",count1);
            }
    }
    return 0;
}
