# coding: utf-8 count=1 for i in map(int,input().split()): if i!=count: print(count) break count+=1