import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); long t = scanner.nextLong(); scanner.close(); long mod = 1000000007; int result = (int) (fast_pow((int) (0.5 * (a + b)), t, mod)); System.out.println(result); } private static long fast_pow(long base, long n, long M) { if (n == 0) return 1; if (n == 1) return base; long halfn = fast_pow(base, n / 2, M); if (n % 2 == 0) return (halfn * halfn) % M; else return (((halfn * halfn) % M) * base) % M; } }