2017 PSUT Coding Marathon |
---|
Закончено |
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?
The input contains three space-separated integers A B C (0 ≤ A, B, C ≤ 100), the number of pieces with each symbol of '.', ':', and ')', respectively.
Print the maximum number of smiley faces Mr. Light can form, on a single line.
2 2 4
3
6 4 6
6
8 1 6
5
Название |
---|