시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 164 76 65 47.794%

문제

2890번을 보면 알겠지만, 상근이는 카약 대회를 개최했다. 그런데, 갑자기 엄청난 강풍이 경기장에 불었고, 일부 카약이 부서졌다. 경기는 5분 안에 시작해야 하는 상황이다.

다행히 일부 팀은 혹시 모를 사태에 대비해서 카약을 하나 더 경기장에 들고 왔다. 카약은 매우 무겁고 운반하기 어렵다. 따라서, 자신의 바로 다음이나 전에 경기하는 팀에게만 카약을 빌려주려고 한다. 즉, 팀 4는 여분의 카약을 3이나 5에게만 빌려줄 수 있다. 또, 카약을 하나 더 가져온 팀의 카약이 손상되었다면, 여분의 카약으로 경기에 출전하게되고, 이 카약은 다른 팀에게 빌려줄 수 없다.

카약이 부서진 팀과 하나 더 가져온 팀이 주어진다. 카약을 적절히 빌렸을 때 출발하지 못하는 팀의 최소값은 몇 팀인지 구하는 프로그램을 작성하시오.

입력

첫째 줄에 팀의 수 N, 카약이 손상된 팀의 수 S, 카약을 하나 더 가져온 팀의 수 R이 주어진다. (2 ≤ N ≤ 10, 2 ≤ S, R ≤ N)

둘째 줄에는 카약이 손상된 팀의 번호가 주어진다. 팀 번호는 중복되지 않는다.

셋째 줄에는 카약을 하나 더 가져온 팀의 번호가 주어진다. 팀 번호는 중복되지 않는다.

출력

첫째 줄에 출발을 할 수 없는 팀의 최소값을 출력한다.

예제 입력 1

5 2 1
2 4
3

예제 출력 1

1
W3sicHJvYmxlbV9pZCI6IjI4OTEiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWNlNzRcdWM1N2RcdWFjZmMgXHVhYzE1XHVkNDhkIiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHQyODkwXHViYzg4XHVjNzQ0IFx1YmNmNFx1YmE3NCBcdWM1NGNcdWFjYTBcdWM5YzBcdWI5Y2MsIFx1YzBjMVx1YWRmY1x1Yzc3NFx1YjI5NCBcdWNlNzRcdWM1N2QgXHViMzAwXHVkNjh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