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?

Input

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.

Output

Print the maximum number of smiley faces Mr. Light can form, on a single line.

ExamplesInput
2 2 4
Output
3
Input
6 4 6
Output
6
Input
8 1 6
Output
5

加入题单

上一题 下一题 算法标签: