Recently, paleoanthropologists have found historical remains on an island in the Atlantic Ocean. The most inspiring thing is that they excavated in a magnificent cave and found that it was a huge tomb. Inside the construction,researchers identified a large number of skeletons, and funeral objects including stone axe, livestock bones and murals. Now, all items have been sorted, and they can be divided into N types. After they were checked attentively, you are told that there are $A_i$ items of the i-th type. Further more, each item of the i-th type requires $B_i$ million dollars for transportation, analysis, and preservation averagely. As your job, you need to calculate the total expenditure.