Once, a boy named Cyril wrote a string consisting of uppercase and lowercase Latin letters on a sheet of paper, and then went to play football. When he returned, he found that his friend Dima had written another string of the same length underneath his. Dima claims that his string was obtained by performing a cyclic right shift of Cyril's string by some number of positions (for example, a cyclic shift of the string abcde by positions to the right gives the string deabc). However, Dima is known to sometimes make mistakes in his calculations, so Cyril is not sure whether to believe him. Help him! Given the strings, output the minimal possible shift, or if Dima was wrong.
The first two lines of the input file contain the strings of Cyril and Dima, respectively. The lengths of the strings are equal, do not exceed , and are not equal to .
Print a single number—the answer to the problem.
Example 1