import algorithm, sequtils, strutils var rgb = stdin.readLine.split.map parseInt sort rgb var (a, b, c) = (rgb[0], rgb[1], rgb[2]) let x = min(b-a, (c - b) div 2) a.inc x b.dec a c.dec x * 2 + a if b == 0: echo a + c div 5 else: echo a + (b + c) div 8 * 2 + (b + c) mod 8 div 5