Each food item contributed to the local food bank is recorded as a positive number, while each food item donated to a family is recorded as a negative number. The food bank started with 508 items. How many items were on the shelves after the following contributions and donations?

-8, -29, +17, -12, -9