Given two strings, and , determine the minimum number of characters that must be removed from the end of string so that it appears in string at least times. The substrings found must not overlap. Note that an empty string is considered to appear infinitely many times in any string, including an empty one.
The first line of the input contains a natural number . The following two lines contain the strings and , each with a length not exceeding characters. The strings are composed of characters with ASCII codes ranging from to , inclusive.
Output the number of characters that need to be removed.
Example 1