ten=["1","2","3","4","5","6","7","8","9","10"] lsten=input().split() lsten.append("0") for i in range(10): if ten[i]!=lsten[i]: break print(ten[i])