Message
InterviewTime limit2sMemory limit1024 MB
Given strings c and s, find the largest k such that c repeated k times is a subsequence of s.
Problem
While traveling, Doctor Strange ran into a hard problem. He must decrypt the string that arrived in his email. The message was encrypted as follows. A string is written some number of times (possibly zero). Then letters of the message are inserted between arbitrary letters of the resulting string, possibly several letters at once, and the result is .
Doctor Strange has already figured out which string was used. To decrypt the message, he needs the maximum number of times could have been written during encryption.
Input
The first line contains the string . The second line contains the string . Each string consists of uppercase and lowercase Latin letters. The length of each string does not exceed .
Output
Print a single integer, the answer to the problem.