{"raw_statement":[{"iden":"problem statement","content":"A string, consisting of letters `A`, `B`, and `C`, is called **good**, if every two consecutive letters are different. For example, strings `ABABAB` and `ABC` are good, while `ABBA` and `AABBCC` aren't.\nYou are given two **good** strings $S$ and $T$ of length $N$. In one operation, you can choose any letter of $S$, and change it to another letter among `A`, `B`, and `C`, so that $S$ remains **good**.\nWhat's the smallest number of operations needed to transform $S$ into $T$? We can prove that it can always be done in a finite number of operations."},{"iden":"constraints","content":"*   $1\\le N \\le 5\\cdot 10^5$\n*   $S$ is a **good** string of length $N$ consisting of `A`, `B`, and `C`\n*   $T$ is a **good** string of length $N$ consisting of `A`, `B`, and `C`"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$S$\n$T$"},{"iden":"sample input 1","content":"4\nCABC\nCBAC"},{"iden":"sample output 1","content":"6\n\nHere is one possible sequence of operations of length $6$:\n`CABC` $\\to$ `BABC` $\\to$ `BCBC` $\\to$ `BCAC` $\\to$ `ACAC` $\\to$ `ABAC` $\\to$ `CBAC`\nIt can be shown that $6$ operations are necessary for this case."},{"iden":"sample input 2","content":"10\nABABABABAB\nBABABABABA"},{"iden":"sample output 2","content":"15"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}