#include #include #include int main() { int a, b, c, k; std::cin >> a; std::cin >> b; std::cin >> k; std::cin >> c; unsigned long long x = 2; unsigned long long modulos = 0; for (int i = 0; i < k - 1; i++) { x *= 2; if (x >= 1000000007) { x = x % 1000000007; modulos++; } } x = x * k; x = x / 2; if (modulos > 0) { x *= modulos; } x = x % 1000000007; std::cout << x << std::endl; return 0; }