//Author: Koppu #include #include long int power(long x, long y) { long res = 1; long p = 1000000000 + 7; x = x % p; while (y > 0) { if (y & 1) res = (res*x) % p; y = y/2; x = (x*x) % p; } return res; } long int total_virus(int a, int b, long t) { long res; long sum; sum = 0.5 * (a + b); res = power(sum, t); return res; } int main(void) { int a; scanf("%d", &a); int b; scanf("%d", &b); long t; scanf("%ld", &t); printf("%ld", total_virus(a, b, t)); return 0; }