n, m = map(int, input().split()) p = float(input()) if n == 1: if m == 1: ans = p else: ans = 2*p*p+(m-2)*p*p**2 else: if m == 1: ans = 2*p*p+(n-2)*p*p**2 else: ans = 4*p*p**2+(2*(m-2)+2*(n-2))*p*p**3+(m-2)*(n-2)*p*p**4 print(ans)