S = sorted(map(int, input().split())) while S[2] - S[0] > 2: S[0] += 1 S[2] -= 2 S.sort() print(S[0])