import decimal h, w = map(int, input().split()) p = decimal.Decimal(input()) if h == 1 and w == 1: ans = p elif h == 1: ans = p ** 2 * 2 + (w - 2) * p ** 3 elif w == 1: ans = p ** 2 * 2 + (h - 2) * p ** 3 else: ans = 0 ans += p ** 3 * 4 ans += p ** 4 * (2 * w + 2 * h - 8) ans += p ** 5 * (h - 2) * (w - 2) print(ans)