B. Guidi wants to be stronger
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Sedentary lifestyle and loss of body mass is an evil that affects college students, including us, in the Maratona. To stay in shape and avoid health problems, Guidi bought a kit of bars and washers along with a reclining bench to become stronger (monstro).

As a good Maratonista, Guidi asked the great wizard Eterom to create a diet based on the simplex algorithm and an exercise routine optimized with combinatorial techniques. The exercise routine is a sequence of movements, where each movement is represented by a character. It is worth mentioning that the order in which each movement is performed is essential for the exercise's effectiveness.

Guidi, a shrewd and cunning competitor, does not want to let his competitors discover the training of the great magician. To hide his training, he opened a bodybuilding guide at the USP Sports Practice Center (CEPE-USP) and had a great idea: to camouflage his optimized training within some sequence of CEPE movements!

For example, let $$$s o a d s$$$ be the sequence of movements of the great magician's training and $$$t s a s d a s$$$ the sequence of movements of the CEPE's training. The best sequence of exercises that Guidi can do in order to hide his training within a sequence of CEPE training movements is $$$s a d s$$$ (bench press, squat, deadlift and bench press).

Given the movement sequences of the great wizard Eterom and CEPE, help Guidi to discover the size of the largest sequence of movements he can make in order to hide his sacred training.

Input

Two lines with one string each, $$$A$$$ and $$$B$$$ $$$(1 \leq |A|, |B| \leq 1000)$$$ ─ the sequence of movements suggested by the great magician Eterom and the sequence of movements of CEPE, respectively. Strings are made up of lowercase letters.

Output

An integer $$$N$$$ ─ the size of the largest sequence of moves Guidi can make in order to hide his optimized training.

Examples
Input
soads
tsasdas
Output
4
Input
babanad
lalaxadnad
Output
5