#include using namespace std; // #include // #include // #include // using namespace __gnu_pbds; // #include // #include // namespace mp = boost::multiprecision; // #include // using namespace atcoder; // https://atcoder.github.io/ac-library/production/document_ja/ typedef long long int ll; typedef long double ld; const ll mod = 1e9+7; const ll INF = 922337203685477580; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define Rep(i,a,n) for (ll i = (a); i < (n); ++i) #define All(a) (a).begin(),(a).end() #define Pi acos(-1) using V = vector; using P = pair; vector dx = {1, 0, -1, 0, 1, 1, -1, -1}; vector dy = {0, 1, 0, -1, 1, -1, 1, -1}; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b >; struct IoSetup { IoSetup() { cin.tie(nullptr); ios_base::sync_with_stdio(false); cout << setprecision(15) << fixed; } } iosetup; void printvec(vector a) { for(ll i = 0; i < a.size(); i++) { cout << a[i] << ' '; } cout << '\n'; } void printgrid(vector> g) { for (ll i = 0; i < g.size(); i++) { printvec(g[i]); } } int main() { ll n; cin >> n; string s, t; cin >> s >> t; ll ans = INF; ll tmp = 0; rep(i,n) { if (s[i] != t[i]) tmp++; } if (tmp%2 == 0) { chmin(ans, tmp); } reverse(All(s)); tmp = 0; rep(i,n) { if (s[i] != t[i]) tmp++; } if (tmp%2 == 1) { chmin(ans, tmp); } cout << ans << '\n'; }