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