# -*= coding: utf-8 -*- b = list(map(int,input().split())) for index, item in enumerate(b): if index != item - 1: print(index + 1) break else: print(10)