enter code here n = int(input()) ideal = list(map(int, input().split())) call = list(map(int, input().split())) ideallen = len(ideal)-1 timer = 0 i = 0 while i