r, b, w = map(int, input().split()) M = max(r, b) m = min(r, b) ans = m + min(M - m, w) + max(0, w - M + m) // 2 print(ans)