codice:
s = map(int, raw_input().split(","))
print set(xrange(s[-1]+1)) - set(s)