X, Y, Z = map(int, input().split()) s = min(X, Y) l = max(X, Y) x = s + Z if x > l: x -= l print(l + (x // 2)) else: print(x)