Buying a direct ticket would be costly given that Sarajevo airport is not connected, and there is little competition. I reserached alot before arriving to this itinerary:

Paris – Cologne/Bonn: fly with germanwings for 40 euros. takes 2 hours
Cologne/Bonn – Zagreb: fly with germanwings for roughly 40 euros. takes 2 hours
Zagreb – Sarajevo: bus for 35 dollars. takes 7 1/2 hours.