Harsh and Akshara are playing the Game of Strings. This game is a simple one and is played as a team. Both the players of a team will be given a string respectively. At the end of this game, every team is required find out the length of the longest string S such that the strings given to each of the team members is a subsequence of S and S contains no vowels. Help Harsh and Akshara in finding out the required length.
Input:
Input consists of a single line containing two space separated strings.
Output:
The length of the longest string that satisfy the given conditions.
Constraints:
1 ≤ length of string ≤ 5000
The required string is "ng".
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor