x,y,z=map(int,input().split()) l=[x,y,z] while 1: l.sort() if l[0]+3>l[2]: break l[0]+=1 l[2]-=2 print(l[0])