시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 794 436 407 57.163%

문제

지민이는 주사위 던지기 게임을 좋아하여 어느 날 옆에 있는 동호를 설득하여 주사위 던지기 게임을 하자고 하였다. 총 3개의 주사위가 있다. 그리고 이 주사위는 각각 S1(2 ≤ S1 ≤ 20), S2(2 ≤ S2 ≤ 20), S3(2 ≤ S3 ≤ 40)개의 면이 있다. (실제로는 주사위가 6개의 면이 있는 것이 정상이지만 특별한 주사위라 생각하자.)

문제는 세 개의 주사위를 동시에 던졌을 때 가장 높은 빈도로 나오는 세 주사위의 합을 구하는 것이다.

입력

입력 파일의 첫째 줄에 정수 S1, S2, S3가 주어진다.

출력

출력 파일의 첫째 줄에 가장 높은 빈도로 나오는 세 주사위 합을 구하는 것이다. 단 답이 여러개라면 가장 합이 작은 것을 출력한다.

예제 입력 1

3 2 3

예제 출력 1

5
W3sicHJvYmxlbV9pZCI6IjEyMzMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM4ZmNcdWMwYWNcdWM3MDQiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YzljMFx1YmJmY1x1Yzc3NFx1YjI5NCBcdWM4ZmNcdWMwYWNcdWM3MDQgXHViMzU4XHVjOWMwXHVhZTMwIFx1YWM4Y1x1Yzc4NFx1Yzc0NCBcdWM4OGJcdWM1NDRcdWQ1NThcdWM1ZWMgXHVjNWI0XHViMjkwIFx1YjBhMCBcdWM2MDZcdWM1ZDAgXHVjNzg4XHViMjk0IFx1YjNkOVx1ZDYzOFx1Yjk3YyBcdWMxMjRcdWI0ZGRcdWQ1NThcdWM1ZWMgXHVjOGZjXHVjMGFjXHVjNzA0IFx1YjM1OFx1YzljMFx1YWUzMCBcdWFjOGNcdWM3ODRcdWM3NDQgXHVkNTU4XHVjNzkwXHVhY2UwIFx1ZDU1OFx1YzYwMFx1YjJlNC4gXHVjZDFkIDNcdWFjMWNcdWM3NTggXHVjOGZjXHVjMGFjXHVjNzA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