import sys def power(x, y, p): res = int(1) # Update x if it is more than or equal to p x = x % p while (y > 0): # If y is odd if (y & 1): res = (res*x) % p y = y>>1 x = (x*x) % p return res inpSplit = input().split() a = int(inpSplit[0])/2 b = int(inpSplit[1])/2 t = int(inpSplit[2]) mod = int(1e9 + 7) result2 = power((int(a+b)),t,mod) print (result2)