func main() var s: []char :: cui@input() var f: bool :: false for i(0, ^s - 1) if (i = 0 & s[i] <> '1') do f :: true end if if (i <> 0 & s[i] <> '3') do f :: true end if end for if (f | ^s = 1) do cui@print("-1") else do cui@print((^s-1).toStr()) end if end func