import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N,M = map(int,readline().split()) P = float(read()) def F(N,M,P): if N > M: N,M = M,N A = [] if N == M == 1: A = [(1,P)] elif N == 1: A.append((2, P**2)) A.append((M-2, P**3)) else: A.append((4,P**3)) A.append((N+N+M+M-8,P**4)) A.append(((N-2)*(M-2),P**5)) return sum(n * p for n,p in A) # F(1,2,0.5), F(2,2,0.25), F(1333,79,0.63) answer = F(N,M,P) print(answer)