proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" ,discardable.} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': return result = 10 * result + k.ord - '0'.ord let x = scan() let y = scan() let z = scan() echo z - (z - x >= 0).int - (z - y >= 0).int