{"raw_statement":[{"iden":"problem statement","content":"Given is a string $S$ consisting of `Y` and `.`.\nYou can do the following operation on $S$ between $0$ and $K$ times (inclusive).\n\n*   Swap two adjacent characters in $S$.\n\nWhat is the maximum possible number of consecutive `Y`s in $S$ after the operations?"},{"iden":"constraints","content":"*   $2 \\leq |S| \\leq 2 \\times 10^5$\n*   Each character of $S$ is `Y` or `.`.\n*   $0 \\leq K \\leq 10^{12}$\n*   $K$ is an integer."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$S$\n$K$"},{"iden":"sample input 1","content":"YY...Y.Y.Y.\n2"},{"iden":"sample output 1","content":"3\n\nAfter swapping the $6$\\-th, $7$\\-th characters, and $9$\\-th, $10$\\-th characters, we have `YY....YYY..`, which has three consecutive `Y`s at $7$\\-th through $9$\\-th positions.  \nWe cannot have four or more consecutive `Y`s, so the answer is $3$."},{"iden":"sample input 2","content":"YYYY....YYY\n3"},{"iden":"sample output 2","content":"4"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}