#include //cin, cout #include //vector #include //sort,min,max #include //string #include //fixed #include //setprecision using namespace std; int main() { int X, Y, Z; cin >> X >> Y >> Z; int ans = 0; int temp = 0; if (X > Y) { ans += Y; temp = X - Y; } else if (X < Y) { ans += X; temp = Y - X; } else { ans += X; } if (Z >= temp) { ans += temp; Z = Z - temp; ans += Z / 2; } else { ans += Z; } cout << ans << endl; return 0; }