l = input().split() t = 1 for hoge in l: if str(t) != hoge: print(str(t)) break t = t + 1