local n = io.read("*n")
local a = io.read("*n")
local b = io.read("*n")

if a > b then
	return 0

end

local total = a + b
local min = total + (n - 2) * a
local max = total + (n - 2)*b

return max - min + 1