#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) #define FOR(i,b,e) for (int i=(int)(b); i<(int)(e); i++) #define ALL(x) (x).begin(), (x).end() const double PI = acos(-1); double solve(int n, int m, double p) { if (n < m) swap(n, m); if (n == 1) return p; double ret = 0.0; if (m == 1) { ret += 2 * p * p; ret += (n - 2) * p * p * p; } else { ret += 4 * p * p * p; ret += 2 * (n + m - 4) * p * p * p * p; ret += (n-2) * (m-2) * p * p * p * p * p; } return ret; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, m; double p; cin >> n >> m >> p; cout << fixed << setprecision(10) << solve(n, m, p) << endl; return 0; }