X, Y, Z = list(map(int, input().split())) m = min(X, Y) X -= m Y -= m ans = m n = max(X, Y) if n <= Z: ans += n Z -= n ans += Z//2 else: ans += Z print(ans)