#include #include #include #include #include #include #include #include #include using namespace std; int main() { int n, cnt = 0; bool yes = false; cin >> n; vector v1(n), v2(n); for (int i = 0; i < n; i++) cin >> v1[i]; for (int i = 0; i < n; i++) cin >> v2[i]; for (int i = 0; i < n; i++){ if (!yes && v1[i] != v2[i]) yes = true; else if (yes && v1[i] == v2[i]){ cnt++; yes = false; } } if (yes) cnt++; cout << cnt << endl; }