Loop x times when IF is false

Edited the Question with better clarity. @jan @RicardoE105 @harshil1712