#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef long double ld; typedef pair P; int main() { int n, m; cin >> n >> m; ld p; cin >> p; if (n > m) swap(n, m); ld res = 0; if (n == 1) { if (m == 1) res = p; else res = p * p * 2 + p * p * p * (m - 2); } else { res = p * p * p * 4 + p * p * p * p * 2 * (n + m - 4) + p * p * p * p * p * (n - 2) * (m - 2); } printf("%.12Lf\n", res); return 0; }