Mad scientist#10118

Mad scientist

1 second
128 megabytes
Medium

Farmer John arranged of his cows, each of which belongs to one of two breeds: Holsteins or Guernseys. He recorded this arrangement as a string of characters, each of which is either or , respectively. Unfortunately, when the cows arrived at the farm and John lined them up again, the resulting string turned out to be different from the original one.

Let us denote these two strings by and , where is the original string that Farmer John wanted to see, and is the string obtained after the cows arrived. Farmer John asked his cousin Ben for help.

After several months of work, Ben created an amazing machine called MCBF-3000, which can select any substring and replace all characters in it with , and all characters with . Now Farmer John wants to know the minimum number of applications of this machine required to transform string into string . Help Farmer John solve this problem.

Input

The first line contains an integer n~(1 \le n \le 1000) — the number of cows. The following two lines contain the strings and . Each string consists only of the characters and .

Output

Print the minimum number of applications of the MCBF-3000 machine required to transform string into string .

Examples

Example 1

Loading
Loading