import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] line = br.readLine().split(" ", 3); int n = Integer.parseInt(line[0]); int m = Integer.parseInt(line[1]); double p = Double.parseDouble(br.readLine()); if (n == 1 && m == 1) { System.out.println(p); return; } else if (n == 1) { double ans = 0; ans += Math.pow(p, 2) * 2; ans += Math.pow(p, 3) * (m - 2); System.out.println(ans); return; } else if (m == 1) { double ans = 0; ans += Math.pow(p, 2) * 2; ans += Math.pow(p, 3) * (n - 2); System.out.println(ans); return; } double ans = 0; ans += Math.pow(p, 3) * 4; ans += Math.pow(p, 4) * ((n - 2) * 2 + (m - 2) * 2); ans += Math.pow(p, 5) * (n - 2) * (m - 2); System.out.println(ans); } }