N,M = map(int,input().split()) P = float(input()) ans = 0 import sys if N > 1 and M > 1: ans += P ** 5 * (N - 2) * (M - 2) ans += P ** 4 * (N + M - 4) * 2 ans += P ** 3 * 4 print(ans) exit() if N == 1 and M == 1: print(P) exit() else: if M == 1: N,M = M,N ans += P ** 3 * (M - 2) ans += P ** 2 * 2 print(ans)