finds factorial of a given number and rescues if given number is negative