modseven = (10 ** 9 + 7) inpy = [int(x) for x in input().split()] a = (inpy[0]+inpy[1])//2 fin = 1 for i in range(0,inpy[2]): fin = fin * a print(fin % modseven)