#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i,a,b) for(long long i=(a);i<(b);++i) #define clr(a, b) memset((a), (b) ,sizeof(a)) #define MOD 1000000007 int main(){ long long b,c,d; cin>>b>>c>>d; long long ans = 0; rep(i,0,d){ ans = (ans+b)%MOD*(c%MOD)%MOD; ans %= MOD; } cout << ans << endl; return 0; }