import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); long t = in.nextLong(); double numCells = 1; for(long i = 0; i < t; i++) { numCells = ((double)a/2 + (double)b/2) * numCells; } System.out.println((int)(numCells % (Math.pow(10, 9) + 7))); } }