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