#include int read() { int x = 0, f = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); } while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar(); } return x * f; } int main() { read(); std::string s, t; std::cin >> s >> t; int ans = INT_MAX; for (int m : { 0, 1 }) { int cnt{}; for (int i = 0; i < s.size(); i++) cnt += s[i] != t[i]; if (cnt % 2== m) ans = std::min(ans, cnt); std::reverse(s.begin(), s.end()); } std::cout << ans << '\n'; return 0; }