#include using namespace std; #define int long long typedef pair P; int INF = 1e16+7; int mod = 1e9+7; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; signed main() { int N; cin >> N; vectorA(N),B(N); for(int i = 0; i < N; i++) { cin >> A[i]; } int ans = 0; bool ok = false; for(int i = 0; i < N; i++) { cin >> B[i]; if(A[i] != B[i] && ok == false) { ans++; ok = true; } if(A[i] == B[i] && ok == true) { ok = false; } } if(ok) { ans++; } cout << ans << endl; }