import java.math.BigInteger; import java.util.Scanner; /** * Created by mayur on 26/7/16. */ public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); BigInteger t = in.nextBigInteger(); new Solver().solve(a, b, t); } } class Solver { public void solve(int a, int b, BigInteger t) { BigInteger mod = BigInteger.valueOf(1_000_000_007); BigInteger ans; ans = BigInteger.valueOf(a).add(BigInteger.valueOf(b)); ans = ans.modPow(t, mod); BigInteger div = BigInteger.valueOf(2).modPow(t, mod); BigInteger fin = ((ans.mod(mod)).multiply(div.modInverse(mod))).mod(mod); System.out.println(fin); } }