문제
Farmer John's cousin Ben happens to be a mad scientist. Normally, this creates a good bit of friction at family gatherings, but it can occasionally be helpful, especially when Farmer John finds himself facing unique and unusual problems with his cows.
Farmer John is currently facing a unique and unusual problem with his cows. He recently ordered
Let us call these two strings
After several months of work, Ben creates a remarkable machine, the multi-cow-breed-flipinator 3000, that is capable of taking any substring of cows and toggling their breeds: all Hs become Gs and all Gs become Hs in the substring. Farmer John wants to figure out the minimum number of times he needs to apply this machine to transform his current ordering
Problem credits: Brian Dean
입력
The first line of input contains
출력
Print the minimum number of times the machine needs to be applied to transform
예제1
7
GHHHGHH
HHGGGHH
2
First, FJ can transform the substring that corresponds to the first character alone, transforming