#include #include #include #include int main(void) { int a, b, time; scanf("%i%i%i", &a, &b, &time); double cells = 1; for( int i = 0; i < time; i++ ) { cells = ((0.5 * a * cells) + (0.5 * b * cells)); } cells = fmod(cells, (pow(10, 9) + 7)); printf("%.0f\n", cells); }