```
class Solution(object):
def missingNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
n = len(nums)
res = n*(n+1) / 2 # get the sum of the total 0~n values where there is no missing value
for i in nums: # subtract each item in the list and the last remaining value is the result
res -= i
return res
```