l = map(int, raw_input().split()) for i,n in enumerate(l): if n != i+1: print i+1 break