// No.656 ゴルフ package main import ( "fmt" ) func CalcScores(scores []int) int { sum := 0 for _, s := range scores { if s == 0 { sum += 10 } else { sum += s } } return sum } func main() { s := make([]int, 9) for i := 0; i < len(s); i++ { fmt.Scanf("%1d", &s[i]) } fmt.Println(CalcScores(s)) }