main = function(input) {
    var data = input.split("\n").join(" ").split(" ");
    var n = data[0];
    var a = data[1];
    var b = data[2];
    
    var ans = (n - 2) * (b - a) + 1;
    
    
    console.log(Math.max(parseInt(ans), parseInt(0)));
};

main(require("fs").readFileSync("/dev/stdin", "utf8"));