s = list(map(int, input().split())) s.sort() total = s[0] for i in range(3): s[i] -= total while True: if s[0] == 0: z = min((s[2]-s[1]+2)//2,s[2]//3) s[2] -= z*2 s[0] += z if all(s[i] > 0 for i in range(3)): m = min(s) total += m for i in range(3): s[i] -= m s.sort() if (s[1]==1 and s[2]<3) or (s[1]==0 and s[2]<5) or (s[1]==2 and s[2]==2): break print(total)