N, M = map(int, input().split()) p = float(input()) if N == M == 1: print(p) elif N == 1: print(p**3 * (M-2) + p**2 * 2) elif M == 1: print(p**3 * (N-2) + p**2 * 2) else: print(p**5 * (N-2) * (M-2) + p**4 * ((N-2)*2 + (M-2)*2) + p**3 * 4)