let convert (c:char) = match (int c) with | i when 48 <= i && i <= 57 -> i - 48 | _ -> 0 let calc = Seq.map convert >> Seq.sum stdin.ReadLine () |> calc |> printfn "%d"