#include<bits/stdc++.h>

using namespace std;





int main()
{

  int n,a,b;



  scanf("%d%d%d",&n,&a,&b);

  int k = n-2;

  int it = b-a;
  if( it < 0)
  {
      printf("%d",0);
  }
    else  if(it ==0)
    {
       printf("%d",1);

    }
    else
    {
        if(n == 1)
                printf("%d",0);
        else
        {


    printf("%d",k*(b-a)+1 );

        }


    }
}



