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