// Arup Guha
// 3/5/2020
// Solution to 2020 February USACO Bronze Problem: Breed Flip

import java.util.*;
import java.io.*;

public class breedflip {

	public static void main(String[] args) throws Exception {
		
		// Set up file.
		Scanner stdin = new Scanner(new File("breedflip.in"));
		
		// Read strings.
		int n = stdin.nextInt();
		char[] str1 = stdin.next().toCharArray();
		char[] str2 = stdin.next().toCharArray();
		
		int i=0, res = 0;
		while (i < n) {
		
			// Go through all the strings in the same mode.
			int j=i;
			boolean mode = str1[j] == str2[j];
			while (j < n && ((str1[j] == str2[j]) == mode)) j++;
		
			// Need to flip all.
			if (!mode) res++;
			
			// Update i.
			i = j;
		}

		// Output to file.
		PrintWriter out = new PrintWriter(new FileWriter("breedflip.out"));
		out.println(res);
		out.close();		
		stdin.close();
	}
}