<>; $_=<>; $d=s/[357]//g; ++$d while s/19//; $d+=s/11//g; print $d;