score:3
The wording is a bit confusing. Let's modify the punctuation a bit to show more clearly the intended meaning:
Holders of [certain visas] may enter and stay, or pass through the territory of Montenegro up to 30 days (and not longer than the expiry of visa if the period of validity of the visa is less than 30 days).
It simply means that you will be allowed to stay for fewer than 30 days if your Schengen visa expires before the end of the 30-day period. In other words, you must leave within 30 days or before your visa expires, whichever comes first.
Note that this does not actually implicate your 34-day duration of stay allowed by the visa; the period of validity is determined by the expiration date. Days spent in Montenegro do not count toward your 34-day total.
Be careful about counting days. For example, if you travel to Paris on the 1st, and from there to Belgrade on the 5th, and leave Belgrade on the 10th, you will have spent five days in the Schengen area and six days in Serbia. In other words, the travel day counts in both jurisdictions.