def permutations(numbers, descents):
    """Compute number of permutations with specified number of descents"""

    if descents in (0, numbers - 1):
        return 1

    add0 = (descents + 1) * permutations(numbers - 1, descents)
    add1 = (numbers - descents) * permutations(numbers - 1, descents - 1)
    return (add0 + add1) % 1001113