#include #include #include #include int main() { int data[3]; scanf("%d %d %d\n", data, data+1, data+2); float factor = (data[0] + data[1])/2.0; printf("%d\n", (int)pow(factor, data[2]) % (int)(pow(10, 9) + 7)); return 0; }