import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int length = sc.nextInt(); int[] before = new int[length]; for(int i = 0; i < length; i++) { before[i] = sc.nextInt(); } int[] after = new int[length]; for(int j = 0; j < length; j++) { after[j] = sc.nextInt(); } int count = 0; int index = 0; while(index != length) { if(before[index] != after[index]) { if(index == length - 1 || before[index + 1] == after[index + 1]) { count++; } } index++; } System.out.println(count); } }