Im trying to figure out a matmatical equation.

If i sent out a questionier to 50 people
and asked how they rated apples on a scale of 1 to 5
and the results came back like this

1 ---- 9
2 ---- 15
3 ---- 18
4 ---- 5
5 ---- 3


How do you determine what the average is?
ie, on average people rated apples 2.5
or whatever the number would be?