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; if(before[0] != after[0]) { count++; } for(int i = 0; i < length - 1; i++) { if(before[i] == after[i] && before[i + 1] != after[i + 1]) { count++; } } System.out.println(count); } }