Day 2 problem of my Math mini-contest 😎