Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n, m = map(int, input().split())
- a = list(map(int, input().split()))
- mex = 0
- for i in range(0, m):
- if i not in a:
- mex += 1
- mex += 1 if m in a else 0
- print(mex)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement