r,g,b=map(int,input().split()) x=min(r,g,b) r-=x;g-=x;b-=x y=(r+g+b)//4 f=0 if (r==0 and max((g-y)//2,0)+max((b-y)//2,0)