def solution(n, lost, reserve):
reserve1 = list(set(reserve) - set(lost))
lost1 = list(set(lost) - set(reserve))
max_result = n -len(lost1)#총 수 - 못 받은인원
for i in reserve1:
if i-1 in lost1: #빌린 상태
lost1.remove(i-1)
max_result +=1
elif i+1 in lost1:
lost1.remove(i+1)
max_result += 1
return max_result