stn = [int(i) for i in input().split()] stn.sort() while max(stn)-min(stn) > 2: stn[0] += 1 stn[2] -= 2 stn.sort() print(min(stn))