def fact(n):
    """
    factorial of n
    :param n: int
    :return: int
    """
    if type(n) != int:
        n = int(n)

    if n == 1:
        return 1

    else:
        acc = 1
        for x in range(1,n+1):
            acc = acc * x

    return int(acc)