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 sc=new Scanner(System.in); int a[]=new int[3]; int i,vir=1,r; for(i=0;i<3;i++) a[i]=sc.nextInt(); while(a[2]>0) { r=calc(vir,a[0],a[1]); vir=r; a[2]--; }/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ System.out.print(vir%(10^9+7)); } public static int calc(int virus,int a,int b) { int v=(int)((a*0.5*virus)+(b*0.5*virus)); return v; } }