func countSegments(s string) int {
f, sum := true, 0
for i := 0; i < len(s); i++ {
if s[i] != ' ' {
if f {
sum++
f = false
}
} else {
f = true
}
}
return sum
}