{"raw_statement":[{"iden":"problem statement","content":"You are given a string $S$. Find the minimum length of a string that can be obtained by performing the following operation on the string $S$ zero or more times.\n\n*   Choose a contiguous occurrence of `of` in the string and an integer $i$ between $0$ and $K$, inclusive. Then, remove the `of` and the following $i$ characters from the string."},{"iden":"constraints","content":"*   $0 \\leq K < |S| \\leq 300$\n*   $K$ is an integer.\n*   $S$ is a string consisting of lowercase English letters."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$S$\n$K$"},{"iden":"sample input 1","content":"keyofscience\n3"},{"iden":"sample output 1","content":"7\n\nBy choosing the `of` formed by the fourth and fifth characters and setting $i = 3$, you can remove `ofsci` from `keyofscience` and get `keyence`.  \nIt is impossible to reduce the length of the string to $6$ or less by repeating the operation, so the answer is $7$."},{"iden":"sample input 2","content":"oofsifffence\n3"},{"iden":"sample output 2","content":"2"},{"iden":"sample input 3","content":"ooofff\n5"},{"iden":"sample output 3","content":"0"},{"iden":"sample input 4","content":"okeyencef\n4"},{"iden":"sample output 4","content":"9"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}