from functools import reduce
from operator import mul


def double_factorial(n):
    """Returns the double factorial of 'n'."""
    if n in range(-1, 2):
        return 1
    else:
        return reduce(mul, (k for k in range(n, 1, -2)))