#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int l, k;
    cin >> l >> k;
    ll dp[110] = {};
    dp[1] = 1;
    for(int i = 1; i <= l ; i++)
    {
        if(i == k) dp[i] += 1;
        if(i - 2 >= 0) dp[i] += dp[i - 2];
        if(i - k - 1 >= 0) dp[i] += dp[i - k - 1];
        //cout << dp[i] << endl;
    }
    ll ans = 0;
    for(int i = 0; i <= l; i++) ans += dp[i];
    cout << ans << endl;
    return 0;
}
