R,G,B = map(int,input().split()) high = 10**7+1 low = 0 while high-low>1: mid = (high+low)//2 x,y,z = R,G,B cmin = min(x,y,z) cnt = cmin x -= cmin y -= cmin z -= cmin x,y,z = sorted([x,y,z]) while z>=3: if y==0: k = z//5 cnt += k z -= 5*k break z -= 2 x += 1 cnt += 1 x -= 1 y -= 1 z -= 1 x,y,z = sorted([x,y,z]) if cnt>=mid: low = mid else: high = mid print(low)