char s[3d5];ll n,r,c;{rd(s@n);rep(i,n)s[i]-c?++r,c=s[i+1]:0;wt(r+c%2);}