var
n, k, i, j: integer;
s: array[1..15] of integer;
begin
assign(input, 'task2.in'); reset(input); readln(n, k); close(input);
assign(output, 'task2.out'); rewrite(output);
for i := 1 to n do
if i <= k then s[i] := 1 else s[i] := 0;<br> for i := 2 to n do
begin
j := i - 1;
while (j > 0) and (j >= i - k) do
begin
s[i] := s[i] + s[j];
j := j - 1
end
end;
write(s[n]);
close(output)
end.