rgb = list(map(int, raw_input().split())) num = 0 while True: mxi = max(rgb) mni = min(rgb) if mxi - mni <= 1: num = mni break for i in range( len(rgb) ): if mxi == rgb[i]: mx = i if mni == rgb[i]: mn = i rgb[mx] -= 2 rgb[mn] += 1 print min(rgb)