/* -*- coding: utf-8 -*- * * 2209.cc: No.2209 Flip and Reverse - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 1000000; /* typedef */ /* global variables */ char s[MAX_N + 4], t[MAX_N + 4]; /* subroutines */ int cntdiff(int n, char s[], char t[]) { int cnt = 0; for (int i = 0; i < n; i++) if (s[i] != t[i]) cnt++; return cnt; } /* main */ int main() { int n; scanf("%d%s%s", &n, s, t); int c0 = cntdiff(n, s, t); reverse(s, s + n); int c1 = cntdiff(n, s, t); printf("%d\n", (! (c0 & 1)) ? c0 : c1); return 0; }