def cmb(n, r, p): if (r < 0) or (n < r): return 0 r = min(r, n - r) return fac[n]*finv[r]*finv[n-r]%p def perm(n,r,p): if (r < 0) or (n < r): return 0 return fac[n]*finv[n-r]%p N = pow(10,7)+10 MOD = pow(10,9)+7 fac = [-1]*(N+1); fac[0] = 1; fac[1] = 1 #階乗 finv = [-1]*(N+1); finv[0] = 1; finv[1] = 1 #階乗の逆元 inv = [-1]*(N+1); inv[0] = 0; inv[1] = 1 #逆元 for i in range(2,N+1): fac[i] = fac[i-1]*i%MOD inv[i] = MOD - inv[MOD%i]*(MOD//i)%MOD finv[i] = finv[i-1]*inv[i]%MOD a,b = map(int,input().split()) n = int(input()) ans = 0 m = n//2 #print(m) for j in range(m+1): #print(n-2*j) temp = 2*cmb(n,2*j,MOD)*pow(a,n-2*j,MOD)*pow(b,j,MOD)%MOD #print(temp) ans = (ans+temp)%MOD print(ans)