#include #include #include #define MOD 1000000007 long long int power (long long int a, long long int b) { long long int ans=1ll; while(b) { if(b&1)ans=(ans*a)%MOD; a=(a*a)%MOD; b=b/2; } return ans; } int main(void) { int aGF = 0; int bGF = 0; long long int tMS = 0; long long int vCount = 1; scanf("%d%d%lld",&aGF,&bGF,&tMS); vCount = 0.5*aGF*1+0.5*bGF*1; // printf("%lld\n",vCount); long long int virus = power(vCount, tMS); // printf("%lld\n",virus); // double vCount = (0.5 * aGF) + (0.5 * bGF) * tMS * (tMS+1)/2; // int virusT = virus % 100000007; printf("%lld\n",virus); return 0; }