// AOJ 1378: Secret of Chocolate Poles
// 2017.12.20 bal4u@uu

#include <stdio.h>

long long dp[101];

int main()
{
	int l, k, s;
	long long ans;

	scanf("%d%d", &l, &k);
	dp[1] = 1;
	if (k <= l) dp[k] = 1;
	for (s = 1; s < l; s++) {
		if (dp[s] > 0) {
			if (s+2   <= l) dp[s+2]   += dp[s];
			if (s+k+1 <= l) dp[s+k+1] += dp[s];
		}
	}

	ans = 0;
	for (s = 1; s <= l; s++) ans += dp[s];
	printf("%lld\n", ans);
	return 0;
}