local n = io.read("*number")
local l = io.read("*number")
local b = io.read("*number")


if l ~= b and n < 2 then
 	return 0
end

if l > b then
	return 0
end

local minx = (n - 1)*l + b
local maxx = (n-1)*b + l

local sum = maxx - minx + 1
print(sum)
