Leandro invests P dollars

you can see them in solve quants problems under video solution tag.