($n,$_)=<>;$n-=$n==$&while s/\d+ ?$//;print$n