Find Sum of Series 1+1/1!+1/2!+1/3!+1/4!+……………

<?php
echo "Enter the n:";
$n=trim(fgets(STDIN));
$sum=1;
for($count=1;$count<$n;$count++)
{
for($conuter=1,$fac=1;$conuter<=$count;$conuter++)
{

$fac= $fac*$conuter;

}
$sum=$sum+(1/$fac);
}

echo " Sum of the factorials ".$sum;

?>