a=sorted(list(map(int,input().split()))) t=a[0] a[1]-=a[0] a[2]-=a[0] while True: if a[1]<1 or a[2]<3:break t+=1; a[1]-=1 a[2]-=3 if a[2]