#include #include #include #include using namespace std; int main() { int n, m, p; cin >> n >> m >> p; vector> dp(2); for(auto& x: dp) x.resize(m); for(int j = 1; j < m; j++) dp[0][j] = j/4.; for(int i = 1; i < n; i++) { dp[i%2][0] = i/4.; for(int j = 1; j < m; j++) { double lhs = dp[i%2][j-1]; double rhs = dp[(i%2)^1][j]; double diff = rhs - lhs; dp[i%2][j] = (lhs+rhs)/2-diff*diff/4; } } cout << fixed << setprecision(39) << (p*dp[1^(n%2)][m-1]) << "\n"; }