시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 254 69 59 31.551%

문제

상근이는 아들이 N명 있다. 아들의 이름은 모두 짝수인 자연수이다. P1, P2, ..., PN

상근이는 곧 태어날 딸을 위해서 이름을 지으려고 한다. 짐작했겠지만, 딸의 이름은 홀수이다. 상근이는 하나뿐인 딸의 이름은 되도록 예쁘게 지으려고 한다. 인터넷에서 숫자 작명법을 찾아보니, 구간 [A, B]에 들어있는 수 중에서 아들 이름과의 차이가 가장 큰 수가 가장 예쁜 딸의 이름이라고 나와있다. 즉, 상근이는 min{|X-Pi|, i ∈ [1,N]}이 가장 큰 X를 딸의 이름을 지으려고 한다.

딸의 이름을 지어주는 프로그램을 작성하시오. 만약, 딸의 이름으로 가능한 자연수가 여러 가지라면 아무거나 출력한다.

입력

첫째 줄에 아들의 수 N이 주어진다. (1 ≤ N ≤ 100) 둘째 줄에는 아들의 이름이 공백으로 구분되어 주어진다. 이름은 항상 109보다 작은 짝수 자연수이다. 셋째 줄에는 A와 B가 주어진다. (1 ≤ A < B ≤ 109)

출력

첫째 줄에 딸의 이름을 출력한다.

예제 입력 1

3
2 6 16
20 50

예제 출력 1

49
W3sicHJvYmxlbV9pZCI6IjMwMTEiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM3NzRcdWI5ODQgXHVjOWMwXHVjNWI0XHVjOGZjXHVhZTMwIiwiZGVzY3JpcHRpb24iOiI8cD5cclxuXHRcdWMwYzFcdWFkZmNcdWM3NzRcdWIyOTQgXHVjNTQ0XHViNGU0XHVjNzc0IE5cdWJhODUgXHVjNzg4XHViMmU0LiBcdWM1NDRcdWI0ZTRcdWM3NTggXHVjNzc0XHViOTg0XHVjNzQwIFx1YmFhOFx1YjQ1MCBcdWM5ZGRcdWMyMThcdWM3NzggXHVjNzkwXHVjNWYwXHVjMjE4XHVjNzc0XHViMmU0LiBQPHN1Yj4xPFwvc3ViPiwgUDxzdWI+MjxcL3N1Yj4sIC4uLiw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