n=io.read("*number")
a=io.read("*number")
b=io.read("*number")
function solve()
	if a > b then
		return 0
	end
	if n == 1 then
		if a == b then
			return 1
		else
			return 0
		end
	end
	return a + (n - 1) * b - ( b + (n - 1) * a ) + 1
end

print(solve())