#P4885. Table Decorations
Table Decorations
Table Decorations
题面翻译
题目描述
您正在为宴会装饰桌子,有 个红色, 个绿色和 蓝色的气球,一张桌子需要三个颜色不完全相同的气球来装饰。
您需要求出可以用所需方式进行装饰的桌子的最大数量 。
输入格式
单行包含三个整数 ,表示红色,绿色和蓝色气球的数量。
输出格式
输出一个整数 表示可以按要求的方式装饰的桌子的最大数量。
题目描述
You have red, green and blue balloons. To decorate a single table for the banquet you need exactly three balloons. Three balloons attached to some table shouldn't have the same color. What maximum number of tables can be decorated if we know number of balloons of each color?
Your task is to write a program that for given values , and will find the maximum number of tables, that can be decorated in the required manner.
输入格式
The single line contains three integers , and ( ) — the number of red, green and blue baloons respectively. The numbers are separated by exactly one space.
输出格式
Print a single integer — the maximum number of tables that can be decorated in the required manner.
样例 #1
样例输入 #1
5 4 3
样例输出 #1
4
样例 #2
样例输入 #2
1 1 1
样例输出 #2
1
样例 #3
样例输入 #3
2 3 3
样例输出 #3
2
提示
In the first sample you can decorate the tables with the following balloon sets: "rgg", "gbb", "brr", "rrg", where "r", "g" and "b" represent the red, green and blue balls, respectively.