#include using namespace std; typedef long long ll; int main() { double N, M, P; cin >> N >> M >> P; if (N > M) { ll t = M; M = N; N = t; } if (M == 1) { cout << P << "\n"; return 0; } if (N == 1) { double ans = 2 * P * P; ans += pow(P, 3) * max(0.0, M - 2); cout << ans << "\n"; return 0; } double ans = 4 * pow(P, 3) + (2 * (N - 2) + 2 * (M - 2)) * pow(P, 4) + (N * M - (2 * N + 2 * (M - 2))) * pow(P, 5); printf("%10.8f\n", ans); return 0; }