package main import ( "strings" "fmt" "strconv" ) func main() { var input string var result int fmt.Scan(&input) var data = strings.Split(input, "") for _, s := range data { n, _ := strconv.Atoi(s) result += n } fmt.Println(result) }