using System; using System.Collections.Generic; using System.IO; using System.Numerics; class Solution { static void Main(String[] args) { string[] values = Console.ReadLine().Split(' '); int a = Convert.ToInt32(values[0]); int b = Convert.ToInt32(values[1]); BigInteger t = BigInteger.Parse(values[2]); int x = (int)(0.5 * (a + b)); Console.WriteLine(BigInteger.ModPow(x, t, 1000000007)); } }