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