x=gets puts (1..10).each.drop_while{|e| x.index(e.to_s)!=nil }[0]