import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long m = sc.nextLong(); double p = sc.nextDouble(); sc.close(); if (m < n) { long t = m; m = n; n = t; } if (n == 1) { if (m == 1) { System.out.println(p); } else { double p2 = p * p; double p3 = p2 * p; System.out.println(2 * p2 + (m - 2) * p3); } } else { double p3 = p * p * p; double p4 = p3 * p; double p5 = p4 * p; System.out.println(4 * p3 + (n * 2 + m * 2 - 8) * p4 + (n - 2) * (m - 2) * p5); } } }