#include using namespace std; int main(){ int X, Y, Z; cin >> X >> Y >> Z; int ans = min({X+Z, Y+Z, (X+Y+Z)/2}); cout << ans << endl; return 0; }