function Main(input){
    input = input.split(" ").map(BigInt);
    var n = input[0];
    var a = input[1];
    var b = input[2];
   // console.log(input)
    if(a>b||(n==1n&&a!=b)){
        console.log(0);
    }else{
        console.log(Number((b-a)*(n-2n)+1n));
    }
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());