import java.util.Scanner;
public class Main {
public static void main(String args[]) {
String x,y;
int num = 0;
char a[] = new char[1000];
char b[] = new char[1000];
try (Scanner sc = new Scanner(System.in)) {
x = sc.nextLine();
y = sc.nextLine();
}
for(int i =0; i<x.length();i++) {
a[i] = x.charAt(i);
b[i] = y.charAt(i);
}
for(int i =0; i<x.length();i++) {
if(a[i] == b[i]) {
continue;
}else {
a[i+1] =(a[i+1]=='*' ?'o':'*') ;
num++;
}
}
System.out.println(num);
}
}