<>;$_=<>; $x=y/357//d; $x+=$%while$%=s/19//g; $x+=$%while$%=s/11//g; print$x