If your first choice doesn't pass the threshold, it goes to your second choice. If your second choice, doesn't pass the threshold, it goes to your third choice. This is fairly simple to do with computer-based voting systems -- something Israel, and Canada, need to implement.
Judge orders Jerusalem Gay Pride attacker to undergo psychiatric evaluation (Haaretz)
from the article: Quarter-million votes go to parties that won't pass minimum threshold