1 cubic inch is 2.54 * 2.54 * 2.54 = 16.4 cc = 16.4 grams. 1 F = 5/9 C. The heat capacity of water is 1 cal/gm.C. So the number of calories is 16.4 * 5/9= 9.1
9.1 cal / F / cubic inch * ( 98 F - 34 F) = 582 cal / cubic inch
Edit: Yes, I realize 1 Cal = 1000 cal, I just wanted to clarify the math.