#include<iostream>
#include<cmath>
using namespace std;
int main(){
	long long n,a,b,m,M;
	cin >> n >> a >> b;
	m = a*(n-1)+b;
	M = b*(n-1)+a;
	if((M-m+1)>=0)	cout << M-m+1 << endl;
	else	cout << 0 << endl;
}