BNP Paribas interview question

coin flip probs, additional conditions