#include #include using namespace std; using ll = long long; #define rep(i, s, t) for (ll i = s; i < (ll)(t); i++) #define all(x) begin(x), end(x) template bool chmin(T& x, T y) { return x > y ? (x = y, true) : false; } template bool chmax(T& x, T y) { return x < y ? (x = y, true) : false; } using mint = atcoder::static_modint<10007>; void solve() { int k, s, n; cin >> k >> s >> n; vector fib(k + 1); fib[0] = fib[1] = 1; rep(i, 1, k) fib[i + 1] = fib[i] + fib[i - 1]; vector dp(n); dp[0] = s; rep(i, 0, n - 1) { rep(c, 0, min(k, i) + 1) dp[i + 1] += dp[i - c] / fib[c]; } cout << dp[n - 1].val() << '\n'; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); int t = 1; // cin >> t; while (t--) solve(); }