X, Y, Z = [int(i) for i in (input().split(' '))] print(min(X, Y) + (Z + abs(X - Y)) // 2)