#P1474. Cow Currency Compositions

    ID: 14760 Type: Default 1000ms 256MiB

Cow Currency Compositions

Cow Currency Compositions

The cows have not only created their own government but have also established their own monetary system. Due to their unique way of thinking, they are curious about the numerical value of their currency.

Traditionally, a monetary system is composed of coins with unit denominations $$1,\;5,\;10,\;20,\;25,\;50,\;100$$.

The cows want to know in how many distinct ways one can form a target amount using the coins in this monetary system. For example, if we consider a coin system such as $$\{1,2,5,10,\ldots\}$$, some ways to obtain a total value of $$18$$ are: $$18\times1$$, $$9\times2$$, $$8\times2+2\times1$$, $$3\times5+2+1$$, etc.

inputFormat

The input consists of a single line containing an integer $$N$$ which denotes the target monetary value. $$N$$ is a non-negative integer.

outputFormat

Output the number of distinct ways to form the amount $$N$$ using the available coins. It is guaranteed that the answer will fit in a 64-bit signed integer.

sample

0
1