#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;

int main(){
    ll n,a,b;cin>>n>>a>>b;
    if(a>b||n==1&&a^b)cout<<0<<endl;
    else cout<<min(n,n*(b-a)+1)<<endl;
}
