(n)
| 1 | def missing_num(n): |
| 2 | n=sorted(n) # shuffling the items of n in a sorted manner |
| 3 | n.append(0) #adding the number 0 at the end for checking purpose |
| 4 | for i in range(1,len(n)+1): |
| 5 | if i!=n[i-1]: # checking for the missing number |
| 6 | return i # returning the missing number |
| 7 | |
| 8 | input() |
| 9 | n = list(map(int, input().split(" "))) # Splitting the input line in a list |