{"raw_statement":[{"iden":"statement","content":"Mr. Light got some pieces of paper, each contains one of the three symbols: '.', ':', and ')'.\n\nHe 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 ':'.\n\nMr. Light has A, B, and C of each symbol of '.', ':', ad ')', respectively. What is the maximum number of smiley faces he can form?\n\nThe input contains three space-separated integers A B C (0 ≤ A, B, C ≤ 100), the number of pieces with each symbol of '.', ':', and ')', respectively.\n\nPrint the maximum number of smiley faces Mr. Light can form, on a single line.\n\n"},{"iden":"input","content":"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."},{"iden":"output","content":"Print the maximum number of smiley faces Mr. Light can form, on a single line."},{"iden":"examples","content":"Input2 2 4Output3Input6 4 6Output6Input8 1 6Output5"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ A, B, C \\in \\mathbb{Z}_{\\geq 0} $ denote the counts of symbols '.', ':', and ')', respectively.\n\n**Constraints**  \n$ 0 \\leq A, B, C \\leq 100 $\n\n**Objective**  \nMaximize the number of smiley faces $ S $, where each smiley requires:  \n- One ')' (i.e., consumes 1 from $ C $), and  \n- Either:  \n  - Two '.' (i.e., consumes 2 from $ A $), or  \n  - One ':' (i.e., consumes 1 from $ B $).\n\nLet $ x $ be the number of smileys formed using two '.' and one ')',  \nand $ y $ be the number of smileys formed using one ':' and one ')'.  \n\nThen:  \n$$\nS = x + y\n$$  \nsubject to:  \n$$\n2x \\leq A, \\quad y \\leq B, \\quad x + y \\leq C, \\quad x, y \\in \\mathbb{Z}_{\\geq 0}\n$$\n\nMaximize $ S = x + y $ under these constraints.","simple_statement":"You have A dots (.), B colons (:), and C closing brackets ().\n\nTo make one smiley face, you need:\n\n- One )  \n- And either:  \n  - Two ., OR  \n  - One :\n\nFind the maximum number of smiley faces you can make.","has_page_source":false}