input: Write a python function to find the missing number in a given list of consecutive integers.
  assert findMissingNumber([1, 2, 3, 4, 6, 7, 8]) == 5
  assert findMissingNumber([10, 11, 12, 14, 15]) == 13
  assert findMissingNumber([100, 101, 102, 104]) == 103
output: def findMissingNumber(nums):
      n = len(nums) + 1
      expected_sum = (n * (nums[0] + nums[-1])) // 2
      actual_sum = sum(nums)
      return expected_sum - actual_sum