404037: GYM101401 A Smiley Faces (A)
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A. Smiley Faces (A)time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
Mr. Light got some pieces of paper, each contains one of the three symbols: '.', ':', and ')'.
He wants to use these pieces to form as many smiley faces as possible. To form one smiley face he needs one piece with a bracket ')' on it and either two pieces with dots '.', or one piece with a colon ':'.
Mr. Light has A, B, and C of each symbol of '.', ':', ad ')', respectively. What is the maximum number of smiley faces he can form?
InputThe input contains three space-separated integers A B C (0 ≤ A, B, C ≤ 100), the number of pieces with each symbol of '.', ':', and ')', respectively.
OutputPrint the maximum number of smiley faces Mr. Light can form, on a single line.
ExamplesInput2 2 4Output
3Input
6 4 6Output
6Input
8 1 6Output
5