Codeforces Round 104 (Div. 2)
C
Lucky Conversion
Codeforces
未评级
原题
← BD →
翻译中…

Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

翻译中…

Petya has two strings $*a*$ and $*b*$ of the same length $*n*$. The strings consist only of lucky digits. Petya can perform operations of two types:

翻译中…
  • replace any one digit from string $*a*$ by its opposite (i.e., replace $4$ by $7$ and $7$ by $4$);
  • swap any pair of digits in string $*a*$.
翻译中…

Petya is interested in the minimum number of operations that are needed to make string $*a*$ equal to string $*b*$. Help him with the task.

翻译中…

Input

翻译中…

The first and the second line contains strings $*a*$ and $*b*$, correspondingly. Strings $*a*$ and $*b*$ have equal lengths and contain only lucky digits. The strings are not empty, their length does not exceed $10^{5}$.

翻译中…

Output

翻译中…

Print on the single line the single number — the minimum number of operations needed to convert string $*a*$ into string $*b*$.

翻译中…

Note

翻译中…

In the first sample it is enough simply to swap the first and the second digit.

翻译中…

In the second sample we should replace the second digit with its opposite.

翻译中…

In the third number we should replace all three digits with their opposites.

翻译中…

样例

Input #1
47
74
Output #1
1
InputCopy OutputCopy
Input #2
774
744
Output #2
1
InputCopy OutputCopy
Input #3
777
444
Output #3
3
InputCopy OutputCopy
题目信息
题号
146C
时间限制
2 s
内存限制
256 MB

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。