#include #include #include #include #include #include #include #include #include #include #include #include #define rep(i, n) for(int i = 0; i < (int)(n); ++i) using namespace std; int main(void) { cout << fixed << setprecision(15); int N, M; long double P; cin >> N >> M >> P; if (N > M) swap(N, M); if (N == 1) { if (M == 1) cout << P << endl; else cout << P * P * 2 + P * P * P * (M - 2) << endl; } else { cout << P * P * P * 4 + P * P * P * P * (2 * N + 2 * M - 8) + P * P * P * P * P * (N - 2) * (M - 2) << endl; } return 0; }