https://programmers.co.kr/learn/courses/30/lessons/42862
def solution(n, lost, reserve):
answer = 0
borrow = []
for a in range(1, n+1):
if a in lost and a in reserve:
lost.remove(a)
reserve.remove(a)
# print(answer)
for i in range(1,n+1):
# print("i", i)
if i in lost:
if i-1 in reserve and i-1 not in borrow:
borrow.append(i-1)
answer +=1
elif i+1 in reserve and i+1 not in borrow:
borrow.append(i+1)
answer +=1
# print(answer)
# print(borrow)
else:
answer +=1
# print(answer)
# print(borrow)
return answer