#include <bits/stdc++.h>
using namespace std;
long long a[55] = {1}, b[55];
int main()
{
int x, y, z;
cin >> x >> y >> z;
for (int i = 1; i <= z; i++)
{
if (i - 2 >= 0)
a[i] = a[i - 1] + b[i - 2];
else
a[i] = a[i - 1] + 0;
if (i - x >= 0)
b[i] = a[i - x] * y;
else
b[i] = 0;
}
cout << a[z];
return 0;
}