func main() var n: []char :: cui@input() var ans: int :: ^n = 1 | n[0] <> '1' | n.replace("3", "") <> "1" ?(-1, ^n - 1) do cui@print("\{ans}\n") end func