{"problem":{"name":"Longest X","description":{"content":"Given is a string $S$ consisting of `X` and `.`. You can do the following operation on $S$ between $0$ and $K$ times (inclusive). *   Replace a `.` with an `X`. What is the maximum possible number o","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc229_d"},"statements":[{"statement_type":"Markdown","content":"Given is a string $S$ consisting of `X` and `.`.\nYou can do the following operation on $S$ between $0$ and $K$ times (inclusive).\n\n*   Replace a `.` with an `X`.\n\nWhat is the maximum possible number of consecutive `X`s in $S$ after the operations?\n\n## Constraints\n\n*   $1 \\leq |S| \\leq 2 \\times 10^5$\n*   Each character of $S$ is `X` or `.`.\n*   $0 \\leq K \\leq 2 \\times 10^5$\n*   $K$ is an integer.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$\n$K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc229_d","tags":[],"sample_group":[["XX...X.X.X.\n2","5\n\nAfter replacing the `X`s at the $7$\\-th and $9$\\-th positions with `X`, we have `XX...XXXXX.`, which has five consecutive `X`s at $6$\\-th through $10$\\-th positions.  \nWe cannot have six or more consecutive `X`s, so the answer is $5$."],["XXXX\n200000","4\n\nIt is allowed to do zero operations."]],"created_at":"2026-03-03 11:01:14"}}