시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 4717 3401 3175 73.292%

문제

상근날드에서 가장 잘 팔리는 메뉴는 세트 메뉴이다. 주문할 때, 자신이 원하는 햄버거와 음료를 하나씩 골라, 세트로 구매하면, 가격의 합계에서 50원을 뺀 가격이 세트 메뉴의 가격이 된다.

햄버거는 총 3종류 상덕버거, 중덕버거, 하덕버거가 있고, 음료는 콜라와 사이다 두 종류가 있다.

햄버거와 음료의 가격이 주어졌을 때, 가장 싼 세트 메뉴의 가격을 출력하는 프로그램을 작성하시오.

입력

입력은 총 다섯 줄이다. 첫째 줄에는 상덕버거, 둘째 줄에는 중덕버거, 셋째 줄에는 하덕버거의 가격이 주어진다. 넷째 줄에는 콜라의 가격, 다섯째 줄에는 사이다의 가격이 주어진다. 모든 가격은 100원 이상, 2000원 이하이다.

출력

첫째 줄에 가장 싼 세트 메뉴의 가격을 출력한다.

예제 입력 1

800
700
900
198
330

예제 출력 1

848
W3sicHJvYmxlbV9pZCI6IjU1NDMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMwYzFcdWFkZmNcdWIwYTBcdWI0ZGMiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YzBjMVx1YWRmY1x1YjBhMFx1YjRkY1x1YzVkMFx1YzExYyBcdWFjMDBcdWM3YTUgXHVjNzk4IFx1ZDMxNFx1YjlhY1x1YjI5NCBcdWJhNTRcdWIyNzRcdWIyOTQgXHVjMTM4XHVkMmI4IFx1YmE1NFx1YjI3NFx1Yzc3NFx1YjJlNC4gXHVjOGZjXHViYjM4XHVkNTYwIFx1YjU0YywgXHVjNzkwXHVjMmUwXHVjNzc0IFx1YzZkMFx1ZDU1OFx1YjI5NCBcdWQ1ODRcdWJjODRcdWFjNzBcdWM2NDAgXHVjNzRjXHViOGNjXHViOTdjIFx1ZDU1OFx1YjA5OFx1YzUyOSBcdWFjZThcdWI3N2MsIFx1YzEzOFx1ZDJiOFx1Yjg1YyBcdWF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