import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)
    val n, a, b = sc.nextLong()
    val max = a + (n - 1) * b
    val min = a * (n - 1) + b
    println(math.max(max - min + 1, 0))
  }

}
