Find the sum of an AP of 40 terms whose first and last terms are 80 and 275.