MOD = 10 ** 9 + 7 INF = 10 ** 20 import sys input = sys.stdin.readline sys.setrecursionlimit(100000000) from collections import defaultdict dy = (-1,0,1,0) dx = (0,1,0,-1) def main(): x,y,z = map(int,input().split()) if x < y: ans = x y -= x x = 0 if z > y: z -= y ans += y + z//2 y = 0 else: ans += z else: ans = y x -= y y = 0 if z > x: z -= x ans += x + z//2 x = 0 else: ans += z print(ans) if __name__ =='__main__': main()