local n = io.read(*n)
local a = io.read(*n)
local b = io.read(*n)
local function add(n,a,b)
	local total = a + b
	local min = total + (n - 2) * a
	local max = total + (n-2)*b
	return max - min + 1
end

print(add(n,a,b))