#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c> n >> m; ld p;std::cin >> p; ld ans = 0; re(i, n){ re(j, m){ ll num = (i!=0) + (i!=n-1) + (j!=0) + (j!=m-1); if(num==0) ans += p; if(num==1) ans += p*p; if(num==2) ans += p*p*p; if(num==3) ans += p*p*p*p; if(num==4) ans += p*p*p*p*p; } } cout << fixed << setprecision(20) << ans << "\n"; }