def solution(A):
sortedset= set(sorted(A))
sol=1
#for i in sortedset
print(sortedset)
for i in sortedset:
if i == sol:
sol+=1
else:
break
print(sol)
A = input()
solution(A)
#A = [1, 3, 6, 4, 1, 2]
''While passing A = input() and input [1,3,6,4,1,2] not getting expected output '5' but if I give instead of user input directly like as A = [1, 3, 6, 4, 1, 2] i'm getting output '5'. Please help me to fix this issue. ''