import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); double rate = sc.nextDouble(); if (h == 1 && w == 1) { System.out.println(rate); } else if (h == 1) { double ans = Math.pow(rate, 2) * 2 + Math.pow(rate, 3) * (w - 2); System.out.println(ans); } else if (w == 1) { double ans = Math.pow(rate, 2) * 2 + Math.pow(rate, 3) * (h - 2); System.out.println(ans); } else { double ans = Math.pow(rate, 3) * 4; ans += Math.pow(rate, 4) * (w - 2) * 2; ans += Math.pow(rate, 4) * (h - 2) * 2; ans += Math.pow(rate, 5) * (w - 2) * (h - 2); System.out.println(ans); } } }