{"raw_statement":[{"iden":"problem statement","content":"You are given strings $S$ and $T$ of length $N$ consisting of lowercase English letters.\nYou can repeat the following operation any number of times (possibly zero).\n\n*   Erase the **first** character of $S$ and insert the same character at any position of $S$.\n\nDetermine whether it is possible to make $S$ equal $T$, and if it is possible, find the minimum number of operations needed."},{"iden":"constraints","content":"*   $1 \\le N \\le 2 \\times 10^5$\n*   $S$ and $T$ are strings of length $N$ consisting of lowercase English letters."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$S$\n$T$"},{"iden":"sample input 1","content":"4\nabab\nabba"},{"iden":"sample output 1","content":"2\n\nYou can make $S$ equal $T$ in two operations, as follows.\n\n*   Erase the first character of $S$, and insert that character `a` at the end of $S$, making $S$ `baba`.\n*   Erase the first character of $S$, and insert that character `b` between the $2$\\-nd and $3$\\-rd characters of $S$, making $S$ `abba`.\n\nIt is impossible to make $S$ equal $T$ in one or fewer operations, so the answer is $2$."},{"iden":"sample input 2","content":"3\narc\ncra"},{"iden":"sample output 2","content":"2"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}