e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Dynamic Programming - Linear

Grasshopper

prb4051

Grasshopper lives in the teacher's room. It likes to jump on one dimensional checkerboard. The length of the board is n cells. To its regret, it can jump only on 1, 2, ..., k cells forward.

Once teachers wondered in how many ways a grasshopper can reach the last cell from the first one. Help them to answer this question.

Input

Two integers n and k (1n30, 1k10).

Output

Print the number of ways for grasshopper to leap from the first cell to the last.

Time limit 1 second
Memory limit 128 MiB
Input example #1
8 2
Output example #1
21