#include using namespace std; int C[ 3 ]; void Cnt( int &iA, int &iB, const int X, const int iNum ) { if( X > iNum ) iA += ( X - iNum ) / 2; else if( X < iNum ) iB += ( iNum - X ); } bool bChk( const int R, const int G, const int B, const int iNum ) { int iA; int iB; iA = 0; iB = 0; Cnt( iA, iB, R, iNum ); Cnt( iA, iB, G, iNum ); Cnt( iA, iB, B, iNum ); return (bool) ( iA >= iB ); } bool bChk( const int iNum ) { return bChk( C[ 0 ], C[ 1 ], C[ 2 ], iNum ); } int main() { int R; int G; int B; int iNum; int iTop; int iBtm; cin >> C[ 0 ]; cin >> C[ 1 ]; cin >> C[ 2 ]; sort( C, C + 3 ); iBtm = C[ 0 ]; iNum = C[ 1 ]; iTop = C[ 2 ]; while( iBtm + 1 < iTop ) { if( bChk( iNum ) ) iBtm = iNum; else iTop = iNum; iNum = ( iBtm + iTop ) / 2; } if( bChk( iTop ) ) cout << iNum << endl; else cout << iBtm << endl; return 0; }