The Italians were beaten 3-1 by the Spanish champions, but Montolivo was unhappy that they didn't make the most of the opportunities that came their way.
"It is difficult to come here and play, though we created a few opportunities. It's a shame we failed to make the most of our chances," he told Mediaset.
"We will have to earn our qualification in the next two games against Ajax and Celtic."
Milan are second in Champions League Group H with five points.