	

    # -*- coding: utf-8 -*-
    # Write your program under these comment lines
    # Γράψτε το πρόγραμμά σας κάτω από αυτές τις γραμμές των σχολίων
     
           
     
    def f(x):
      return (-1)*(1/6.)*(x-1)*(x-2)*(x+2)*(x-4)
     
    x1,x2,n = input()
    while n!=0:
      u = abs((x2 - x1))/ float(n)
      S = 0
      for i in range(0,n):
        m1 = x1 + u*i
        b = f(m1)
        m2 = x1 + u*(i+1)
        B = f(m2)
        E = float((b+B))*u / 2.
        S = S + E
         
      print format(S, '.3f')
      x1,x2,n = input()

