r, b, w = map(int, input().split()) print(min(min(r, b)+w, (r+b+w)//2))