ans=0 n=int(input()) a=list(map(int,input().sprit())) b=list(map(int,input().sprit())) c=[0] for i in range(n): if a[i]==b[i]: c.append(0) else: c.append(1) c.append(0) for i in range(n+1): if c[i]!=c[i+1]: ans+=1 print(ans/2)