#coding: utf-8 ##yuki_91 a=map(int,raw_input().split()) a.sort() x,y,z=a res=x y=y-x z=z-x x=y y=z while x>=1 and y>=3: res+=1 x-=1 y-=3 if y