{"raw_statement":[{"iden":"problem statement","content":"You are given a string $S$ of length $N$ consisting of `A`,`R`,`C`.\nAs long as $S$ contains three consecutive characters that are `ARC`, you can perform the operation below.\n\n*   In an odd-numbered ($1$\\-st, $3$\\-rd, $5$\\-th, ...) operation, choose in $S$ three consecutive characters that are `ARC`, and replace them with `R`.\n*   In an even-numbered ($2$\\-nd, $4$\\-th, $6$\\-th, ...) operation, choose in $S$ three consecutive characters that are `ARC`, and replace them with `AC`.\n\nFind the maximum number of operations that can be performed."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2\\times 10^5$\n*   $S$ is a string of length $N$ consisting of `A`,`R`,`C`."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$S$"},{"iden":"sample input 1","content":"6\nAARCCC"},{"iden":"sample output 1","content":"2\n\nYou can perform two operations as follows.\n`AARCCC` → `ARCC` → `ACC`"},{"iden":"sample input 2","content":"5\nAAAAA"},{"iden":"sample output 2","content":"0\n\n$S$ does not contain three consecutive characters that are `ARC`, so you cannot perform the operation at all."},{"iden":"sample input 3","content":"9\nARCARCARC"},{"iden":"sample output 3","content":"3"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}