object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N, A, B = sc.nextLong()
  val count = A match {
    case B => 1
    case _ if B - A < 0 || (N == 1 && 0 < B - A) => 0
    case _ =>
      val min = A * (N - 1) + B
      val max = A + B * (N - 1)
     max - min + 1
  }
  println(count)
}
