#your code goes here R,G,B=(int (i)for i in input ().split()) if R>=G: L=R M=G else: L=G M=R if M>=B: N=B else: N=M if L>=B: M=B else: M=L L=B L-=N M-=N if L>3*M: N+=M L-=3*M N+=L//5 else: L1=L-M L1//=2 N+=L1 # print (N) L-=L1 M-=L1 L1*=2 L-=L1 L2=L//4 M2=M//4 N+=L2+M2 # print (N) L2*=3 L-=L2+M2 M-=M2 if L==3: N+=1 print (N)