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