import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static BigDecimal pow(BigDecimal bd, int exponent) { if (exponent == 1) { return bd; } //First Calculate square BigDecimal sq = bd.multiply(bd); if (exponent == 2) { return sq; } BigDecimal bd3 = new BigDecimal(1); while (exponent>1) { bd3 = bd3.multiply(sq); exponent -= 2; } if (exponent == 1) { bd3 = bd3.multiply(bd); } return bd3; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); int t = in.nextInt(); in.close(); double f = 0.5*(a+b); //System.out.println("f="+f); BigDecimal bd = new BigDecimal(f); //System.out.println("bd="+bd.toPlainString()); bd = pow(bd, t); //System.out.println("after power bd="+bd.toPlainString()); BigDecimal bd2 = ((new BigDecimal(10)).pow(9)).add(new BigDecimal(7)); //System.out.println("bd2="+bd2.toPlainString()); BigDecimal bd3 = bd.divide(bd2, BigDecimal.ROUND_DOWN).multiply(bd2); //System.out.println("bd3="+bd3.toPlainString()); bd3 = bd.subtract(bd3); System.out.println(bd3.toPlainString()); } }