program cojs93;
var
ans,m,i,n:longint;
procedure dfs(x,y,k:longint);
var
i:longint;
begin
if (k=m)and(y>=x) then
begin
inc(ans);
exit;
end;
for i:=x to y do
dfs(i,y-i,k+1);
end;
begin
assign(input,'sdhf.in');
assign(output,'sdhf.out');
reset(input);
rewrite(output);
readln(n,m);
ans:=0;
for i:=1 to n div m do
dfs(i,n-i,2);
writeln(ans);
close(input);
close(output);
end.