Pavel runs the ropewalk at the peat bogs of Mossgrieve. Today the books show a list of letters, and the numbers must be worked out before sundown. Task: Print the length of the longest common prefix of s and t. Input format: Two lines: string s, then string t. Output format: Print the common prefix length. Constraints: 1 <= |s|,|t| <= 1318.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= |s|,|t| <= 1318.
