s = "How many goats could a goat goat goat if a goat could goat"

print(s.count("goat"))
