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