#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int mod = 1e9 + 7; const ll infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; int main(){ cout << fixed << setprecision(10); ll N,M;double P; cin >> N >> M >> P; if(N==1){ if(M==1){ cout << P << endl; } else{ cout << 2*P*P+(M-2)*P*P*P << endl; } } else{ if(M==1){ cout << 2*P*P+(N-2)*P*P*P << endl; } else{ cout << 4*P*P*P+2*(N-2+M-2)*P*P*P*P+(N-2)*(M-2)*P*P*P*P*P << endl; } } return 0; }