def factorial_r(n):
    """
    Input: a number.
    Output: find the factorial of the input number using recursion.
    """
    if n == 0:
        return 0
    if n == 1:
        return 1
    else:
        return (n * factorial_r(n-1))