import java.io.*; import java.util.*; import java.math.BigInteger; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner in = new Scanner(System.in); BigInteger factorA = new BigInteger(in.next()); BigInteger factorB = new BigInteger(in.next()); BigInteger milliseconds = new BigInteger(in.next()); in.close(); BigInteger prob = new BigInteger("2"); BigInteger mod = new BigInteger("1000000007"); factorA.add(factorB).divide(prob).modPow(milliseconds, mod); System.out.println(factorA.add(factorB).divide(prob).modPow(milliseconds, mod).intValue()); } }