X, Y, Z = map(int, input().split()) p = min(X, Y) p += min(Z, (abs(X-Y)+Z)//2) print(p)