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 print ans + (0 if S[2]-t-ans < 3 else (S[1]-ans)/2)