S = map(int,raw_input().split()) S.sort() if (S[1]-S[0])*2 <= S[2]-S[1]: print S[1] + (S[2]-(S[1]-S[0])*2-S[1])/5 else: t = (S[2]-S[1])/2*2 ans = S[0] + t/2 S[1] -= ans; S[2] -= t + ans print ans + (S[1]/4*2 if S[1] == S[2] else 1+(S[1]-1)/4*2)*(S[2]>=3)