S = sorted(map(int, input().split())) a = S[0] for i in range(3): S[i] -= a b = (S[2] - S[1]) // 2 a += b S[1] -= b S[2] -= b * 3 b = S[1] // 4 a += b * 2 S[1] -= b * 4 S[2] -= b * 4 if S[2] > 2: a += 1 print(a)