#include using namespace std; using lint = long long; template using V = vector; template using VV = V< V >; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int x, y, z; cin >> x >> y >> z; cout << min({x + z, y + z, (x + y + z) / 2}) << '\n'; }