#include using namespace std; using namespace chrono; #if __has_include() #include using namespace atcoder; #endif int main() { int64_t x, y, z; cin >> x >> y >> z; int64_t ans = 0; { int64_t d = min(x, y); ans += d; x -= d; y -= d; } { int64_t d = min(max(x, y), z); ans += d; if (x < y) { swap(x, y); } x -= d; z -= d; } ans += z / 2; cout << ans << endl; return 0; }