Repeated! Factorials! Not to be confused with Find the factorial!

Introduction

The factorial of an integer n can be calculated by
$$n!=n\times(n-1)\times(n-2)\times(...)\times2\times1$$

This is relatively easy and nothing new. However, factorials can be extended to double factorials, such that
$$n!!=n\times(n-2)\times(n-4)\times(...)\times4\times2$$
for even numbers, and 
$$n!!=n\times(n-2)\times(n-4)\times(...)\times3\times1$$
for odd numbers. But we're not limited to double factorials. For example
$$n!!!=n\times(n-3)\times(n-6)\times(...)\times6\times3$$
or
$$n!!!=n\times(n-3)\times(n-6)\times(...)\times5\times2$$
or
$$n!!!=n\times(n-3)\times(n-6)\times(...)\times4\times1$$
depending on the starting value.

In summary:
$${\displaystyle n!^{(k)}={\begin{cases}1&amp;{\text{if }}n=0 \\n&amp;{\text{if }}0&lt;n\leq k\\n\cdot\left({(n-k)!}^{(k)}\right)&amp;{\text{if }}n&gt;k\end{cases}}}$$
where
$${\displaystyle n!^{(k)}=n\underbrace{!\dots!}_{k}}$$
Or, in plain English: Subtract the factorial count from the base number repeatedly and multiply all resulting positive integers.

The Challenge

Write a function that will calculate any kind of repeated factorial for any non-negative integer.

Input

Either


A string containing a non-negative base-ten integer, followed by 1 or more exclamation marks. E.g. "6!" or "9!!" or "40!!!!!!!!!!!!!!!!!!!!".


or


The same values represented by two integers: one non-negative base value and one positive value representing the factorial count. This can be done according to any format from the default I/O rules.


Output

The result of said calculation.

Challenge remarks


0! equals 1 by definition. Your code must account for this.
The factorial count is limited by $$ 0 &lt; factorial~count \leq base~value $$outside this range, you are free to output whatever. Aside from 0!, which is the only exception to this rule.


Examples

Input                              Output

3!!!                               3
0!                                 1
6!                                 720
9!!                                945
10!!!!!!!!                         20
40!!!!!!!!!!!!!!!!!!!!             800
420!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  41697106428257280000000000000000


Try it with an ungolfed Python implementation: Try it online!

General remarks


This is code-golf, so the answer using the fewest bytes in each language wins.
Standard rules, I/O rules and loophole rules apply.
Please include a Try it Online-link to demonstrate your code working.
Please motivate your answer with an explanation of your code.
R, 33 bytes



function(n,k)prod(seq(n+!n,1,-k))


Try it online!

Handles \$n=0\$ by adding the logical negation of \$n\$.