import sequtils,strutils,math var R,G,B : int cnt = 0 m,M,n : int (R,G,B) = stdin.readline.split.map(parseInt) m = min(@[R,G,B]) R -= m G -= m B -= m cnt += m m = 0 M = max(@[R, G, B]) var A = [R,G,B] proc test(x : int):bool = var fcnt : int for a in A: fcnt += min(a, x) fcnt += max((a - x) div 2, 0) result = (fcnt >= x * 3) while m != M: n = (m + M + 2) div 2 if test(n): m = n else: M = n - 1 echo m + cnt