#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // #define _GLIBCXX_DEBUG // #define _LIBCPP_DEBUG 0 #define _GLIBCXX_DEQUE_BUF_SIZE 64 #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define revrep(i, n) for(int i = (int)(n - 1); i >= 0; --i) #define range(i, s, t) for (int i = (int)(s); i < (int)(t); ++i) #define revrange(i, s, t) for(int i = (int)(t - 1); i >= (int)(s); --i) #define srange(i, s, t, step) for(int i = (int)(s); i < (int)(t); i+=int(step)) #define popcnt(x) __builtin_popcountll(x) #define hayai std::ios::sync_with_stdio(false);std::cin.tie(nullptr) #define SORT(x) sort(x.begin(), x.end()) #define ERASE(x) x.erase(unique(x.begin(), x.end()), x.end()) using namespace std; using ll = long long; using pii = pair; using pll = pair; template inline bool chmax(T& a, T b){ if (a < b){ a = b; return true; } return false; } template inline bool chmin(T& a, T b){ if (a > b){ a = b; return true; } return false; } inline bool inside(int x, int y, int h, int w) { return (x >= 0 && x < h && y >= 0 && y < w); } constexpr pair dydx4[] = { {0, 1}, {-1, 0}, {0, -1}, {1, 0}, }; //RULD constexpr pair dydx8[] = { {0, 1},{-1, 1},{-1, 0},{-1, -1},{0, -1},{1, -1},{1, 0},{1, 1}, }; namespace tktk { void inline print() { cout << '\n'; } template void print(Head&& head, Tail&&... tail) { cout << head; if(sizeof...(tail) != 0) cout << " "; print(forward(tail)...); } template void print(vector &vec) { for(auto &a: vec) { cout << a; if(&a != &vec.back()) cout << " "; } cout << endl; } template void print(vector> &mat) { for(auto &vec: mat) { print(vec); } } } //tktk void solve() { int n; cin >> n; string s, t; cin >> s >> t; int ans = 100 * n; int cnt = 0; rep(i, n) cnt += s[i] != t[i]; if(cnt % 2 == 0) { chmin(ans, cnt); } cnt = 0; reverse(s.begin(), s.end()); rep(i, n) cnt += s[i] != t[i]; if(cnt % 2 == 1) { chmin(ans, cnt); } cout << ans << endl; } int main() { hayai; // int t; // cin >> t; // rep(i, t) solve(); solve(); }