import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
public static double f(double x){return (-3*x*x+2*x+9);}
public static double I(double a,double b,int n,double y){return ((b-a)/(2*n)*y);}
{
Scanner in
= new Scanner
(System.
in); int n; double a,b,dy,In,y=0;
a = in.nextDouble();
b = in.nextDouble();
n = in.nextInt();
if (n>1){
dy=(b-a)/n;
y+=f(a)+f(b);
for (int i=1; i<n; i++) {y+=2*(f(a+dy*i));}
In=I(a,b,n,y);
}
else {System.
out.
printf("Wrong Data");} }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyBkb3VibGUgZihkb3VibGUgeCl7cmV0dXJuICgtMyp4KngrMip4KzkpO30KCXB1YmxpYyBzdGF0aWMgZG91YmxlIEkoZG91YmxlIGEsZG91YmxlIGIsaW50IG4sZG91YmxlIHkpe3JldHVybiAoKGItYSkvKDIqbikqeSk7fQoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJaW50IG47IGRvdWJsZSBhLGIsZHksSW4seT0wOwoJCWEgPSBpbi5uZXh0RG91YmxlKCk7CgkJYiA9IGluLm5leHREb3VibGUoKTsKCQluID0gaW4ubmV4dEludCgpOwoJCWlmIChuPjEpewoJCQlkeT0oYi1hKS9uOwoJCQl5Kz1mKGEpK2YoYik7CgkJCWZvciAoaW50IGk9MTsgaTxuOyBpKyspIHt5Kz0yKihmKGErZHkqaSkpO30KCQkJSW49SShhLGIsbix5KTsKCQkJU3lzdGVtLm91dC5wcmludGYoIiVmIiwgSW4pOwoJCX0KCQllbHNlIHtTeXN0ZW0ub3V0LnByaW50ZigiV3JvbmcgRGF0YSIpO30KCX0KfQ==