#include using namespace std;using d=__float80;int main(){d n,m,p;cin>>n>>m>>p;d tn=n==1?1:(p*(n-2)+2)*p,tm=m==1?1:(p*(m-2)+2)*p;cout<