#include #include #define int long long #define override_rep(i, l, r, mes, ...) mes #define rep1(i, n) for (int i = 0; i < n; i++) #define rep2(i, l, r) for (int i = l; i < r; i++) #define rep(...) override_rep(__VA_ARGS__, rep2, rep1)(__VA_ARGS__) using namespace std; using P = pair; using ll = long long; using ld = double; using bint = boost::multiprecision::cpp_int; constexpr int MOD = 1e9 + 7; template istream& operator>>(istream& in, pair& p) { in >> p.first >> p.second; return in; } // https://twitter.com/vane11ope ←フォローしましょう // (ノ)>◡<(ヾ)モチモチ signed main(signed argc, char* argv[]) { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin>>n; vector a(n),b(n); rep(i,n)cin>>a[i]; rep(i,n)cin>>b[i]; bool bo=true; int ans=0; rep(i,n){ if(bo && a[i]!=b[i]){ bo=false; ans++; } if(a[i]==b[i])bo=true; } cout<