#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; using mint = modint998244353; int main() { int n; cin >> n; string s, t; cin >> s >> t; int cnts = 0, cntt = 0; for (int i = 0; i < n; i++) { if (s[i] == '1') cnts++; } for (int i = 0; i < n; i++) { if (t[i] == '1') cntt++; } if (cnts % 2 == cntt % 2) { int cnt = 0; for (int i = 0; i < n; i++) { if (s[i] != t[i]) cnt++; } cout << cnt << endl; } else { int cnt = 0; for (int i = 0; i < n; i++) { if (s[n - 1 - i] != t[i]) cnt++; } cout << cnt << endl; } return 0; }