লালে লাল 1 | Math Problem

Click here to read the complete problem statement.

How can I solve this?