{"raw_statement":[{"iden":"problem statement","content":"Given is a string $S$ of length $N$. Let $s_i$ denote the $i$\\-th character of $S$. Find the maximum number of times the following operation can be done.\n\n*   Choose three consecutive characters in $S$, $s_i,s_{i+1},s_{i+2}\\quad (1\\leq i\\leq |S|-2)$, such that $s_i=s_{i+1}\\neq s_{i+2}$, and replace $s_{i+2}$ with $s_i$."},{"iden":"constraints","content":"*   $3 \\leq |S| \\leq 2\\times 10^5$\n*   $S$ consists of lowercase English letters."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$S$"},{"iden":"sample input 1","content":"accept"},{"iden":"sample output 1","content":"3\n\nWe can do the operation three times, as follows:\n\n*   do it with $i=2$, changing the string to `acccpt`;\n*   do it with $i=3$, changing the string to `acccct`;\n*   do it with $i=4$, changing the string to `accccc`."},{"iden":"sample input 2","content":"atcoder"},{"iden":"sample output 2","content":"0"},{"iden":"sample input 3","content":"anerroroccurred"},{"iden":"sample output 3","content":"16"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}