package main import "fmt" import "strconv" import "strings" func main() { var s string fmt.Scan(&s) sum := 0 for _, v := range strings.Split(s, "") { if i, err := strconv.Atoi(v); err == nil { sum = sum + i } } fmt.Println(sum) }