$n=<>; @a=glob<>; @b=glob<>; $r=0; for(0..$n-1){ if($a[$_]==$b[$_]){ $f=0; }else{ if(!$f){ ++$r; } $f=1; } } print $r;