N,M = map(int,input().split()) p = float(input()) ans = 0 #1マスのとき if N == 1 and M == 1: print(p) exit() #細長いとき if (N == 1 and M != 1) or (N != 1 and M == 1): E = max(N,M) print(2* p**2 + (E-2)* p**3) exit() #それ以外 print(4* p**3 + 2*(M+N-4)* p**4 + (M-2)*(N-2)* p**5 )