import Control.Monad
import Control.Applicative
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T

solve :: Text -> Text
solve str =
    let w:texts = T.lines $ str in
    T.pack . show . length . T.breakOnAll w $ T.unlines texts

main =
    T.putStrLn =<< solve <$> T.getContents