#include <stdio.h>
#include <math.h>


int
main(){
	double a, b, c, s = 0, h;
	printf("Enter from to and amount of steps:\n");

	scanf("%lf %lf %lf", &a, &b, &c);
	h = (b-a)/c;
	for(double x = a+h; x <= b-h; x += h){
		s += exp(x+2);
	}
	s = h * ( (exp(a+2) + exp(b+2))/2 + s);
	printf("result:%lf\n", s); 
return 0;}
