stdin.ReadLine() |> Seq.choose ( fun c -> if '0' <= c && c <= '9' then Some ((int c)-48) else None ) |> Seq.sum |> stdout.WriteLine