import std.stdio, std.string, std.conv;
import std.algorithm, std.array;
auto solve(string s_) {
    auto NAB = s_.map!(to!long);
    immutable N=NAB[0], A=NAB[1], B=NAB[2];
    if(A>B || (A<B && N<2)) return 0;
    return (B-A)*(N-2)+1;
}
void main(){ for(string s; (s=readln.chomp()).length;) writeln(solve(s)); }