num = list(map(int, input().split())) while True: num.sort() if num[0] + 3 > num[2]: break num[0] += 1 num[2] -= 2 print(num[0])