Cut To Match

Problem

A spell checker treats two words as matching when one is a rearrangement of the other, so every letter must appear the same number of times in both. Two words a and b rarely match as they stand.

You may delete any letters from either word, as many as you like, from any positions. Find the smallest total number of deleted letters, counted across both words, after which the two words are anagrams of each other. Deleting every letter from both words is allowed, since two empty words are anagrams.

Input

Two lines. The first line is the word a, the second line is the word b. Both use only lowercase letters a to z.

Output

Print one integer: the smallest total number of deletions.

Constraints

  • 1 ≤ |a|, |b| ≤ 200000

Notes

In the first example, cabbage has one a, one b and one c more than badge can match, and badge has a d that cabbage does not have. Removing those four letters leaves the same letters on both sides, abge, so 4 deletions are enough. Any smaller number would leave some letter with different counts in the two words.