Math Puzzle Solution

Did you find the highest possible number?


The Solution

The Answer is: 51181 (see the image)