sum g(i) for i= 1 to 5