Unlike previous DOJ Beginner Contests, the problems in this contest have different point values.
There is no penalty for wrong submissions. Each problem has subtasks.
The people, organizations, trademarks, and other names appearing in this contest’s problems have no connection to their real-world counterparts, even if they are identical or similar.
ChatDOJ, Inc. operates a conversational AI service called ChatDOJ.
Language models process users' questions by dividing them into units called tokens. ChatDOJ, Inc. has decided to allocate more initial memory to a conversation session when the question contains more tokens.
ChatDOJ, Inc. wants to calculate the token count in the web browser before sending the question to the server, so that the website responds quickly. However, the company does not want to expose its tokenizer, the tool that performs the actual tokenization, so it has decided to estimate the token count using the following simple rules.
a through z. Each resulting part of length at least is called a word.The first line contains an integer , the length of the string .
The second line contains a string obtained by replacing every space in the user's question with an underscore (_).
Print the total number of tokens estimated according to the given rules as an integer. If there are no words, print .
The words in the first example are hi, can, you, recommend, another, reliable, ai, and service, for a total of words. Each word is assigned token as a base amount. The words recommend, another, reliable, and service, whose lengths are , , , and , respectively, are each assigned additional token. Therefore, the total number of tokens is .
Characters other than lowercase English letters only separate words and are not assigned any tokens themselves.
Given a user's question, find the total number of tokens estimated according to the rules above.
The second example contains no lowercase English letters, so there are no words. Therefore, the answer is .
The words in the third example are this, model, does, and everything, with lengths , , , and , respectively. They are assigned , , , and tokens, respectively, so the answer is .