console.log((args=>{
  const [N,A,B] = args.trim().split` `.map(BigInt);
  if ( A > B || N == 1 ) return '0';
  return `${(B-A) * (N-2n) + 1n}`;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
