import java.util.*

fun main(args: Array<String>){
  val (N,A,B) = readLine()!!.split(' ').map(String::toLong)
  val min = (N-1)*A+B
  val max = (N-1)*B+A
  val res = if (max-min<0) 0 else max-min+1
  println(res)
}
