Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EI2223Q1ADAF2 - REMOVING CHARACTERS

Given a string S and a pattern P . Delete some characters in the text to form the maximum consecutive pattern strings. What is the maximum number of pattern strings can be created?

Input

The first line is the string S (0 ≤ |S| ≤ 105)

The second line is the string P (0 ≤ |P| ≤ 105).

Both strings contain only lowercase characters.

Output

A single number which is the maximum number of patterns can be created

Sample

Input

Output

abcdbacdb

acb

2

 


Added by:Ha Minh Ngoc
Date:2022-12-26
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.