import sequtils, strutils var x: seq[int] = stdin.readline.split.map(parseInt) ans: int = 0 while x[0] > 0 and x[1] > 0: x[0].dec x[1].dec ans.inc if x[0] == 0 and x[2] > 0: x[0].inc x[2].dec if x[1] == 0 and x[2] > 0: x[1].inc x[2].dec echo ans