BNP Paribas Interview Question

coin flip probs, additional conditions