stn = [int(i) for i in input().split()] stn.sort() acc = 0 while stn[0] >= 1: stn[0] -= 1 stn[1] -= 1 stn[2] -= 1 stn.sort() acc += 1 while stn[1] >= 1 and stn[2] >= 3: stn[1] -= 1 stn[2] -= 3 stn.sort() acc += 1 while stn[2] >= 5: stn[2] -= 5 acc += 1 print(acc)