import java.util.Scanner object Main extends App { val sc = new Scanner(System.in) val n = sc.nextInt val al = Array.fill(n)(sc.nextInt) val bl = Array.fill(n)(sc.nextInt) val cl = (0 until n).toArray.map(i => al(i) != bl(i)) var ans = 0 var f = cl(0) for(i <- 0 until n) { if(cl(i)) { if(f) { ans += 1 f = false } } else { f = true } } println(ans) }