import java.util.*; public class Plo{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); long visina = sc.nextInt(); long sirina = sc.nextInt(); long k = sc.nextInt(); long stPloscic = (visina/(1 << k))*(sirina/(1 << k)); for (long i = k - 1; i >= 0; i--) { if ((sirina & (1 << i)) > 0) stPloscic += (visina / (1 << i)); if ((visina & (1 << i)) > 0) stPloscic += (sirina / (1 << i)); if ((sirina & (1 << i)) > 0 && (visina & (1 << i)) > 0) stPloscic--; } System.out.println(stPloscic); } }