Seventeen Contrade run for the prize , a painted flag , or Palio bearing an image of the Blessed Virgin Mary . Seventeen Contrade ( which are city neighborhoods originally formed as battalions for the city 's defense ) vie for the trophy : a painted banner , or Palio bearing an image of the Blessed Virgin Mary .