R,G,B = map(int,input().split()) left = -1 right = 10**9 + 1 ans = 0 def search(mid,R,G,B): count = 0 count += min(R,G,B) R -= count G -= count B -= count s = 0 if(R != 0 and R % 2 == 0): s += 1 if(G != 0 and G % 2 == 0): s += 1 if(B != 0 and B % 2 == 0): s += 1 t = R + G + B if(s != 2 and s != 0): count += t // 4 else: if((t //4 ) % 2 != s % 2): count += (t // 4) count -= 1 else: count += t // 4 return count while abs(left - right) > 1: mid = (left + right) // 2 if(search(mid,R,G,B) >= mid): left = mid ans = max(ans,mid) else: right = mid print(ans)