_ = input() knots = set(map(int, input().split())) learnedknots = set(map(int, input().split())) print(list(knots.difference(learnedknots))[0])