#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); double n, m, p; cin >> n >> m >> p; cout << fixed << setprecision(15); if(n == 1 && m == 1){ cout << p << '\n'; }else if(n == 1 || m == 1){ cout << 2 * p * p + (n * m - 2) * p * p * p << '\n'; }else{ cout << p * (4 * p * p + (2 * (n + m) - 8) * p * p * p + (n * m - 2 * (n + m) + 4) * p * p * p * p) << '\n'; } }