I would use Turbowarp for this to go faster: https://turbowarp.org/1219178907?turbo Press H to hide variables and S to show variables, Space to render.
This forum: https://scratch.mit.edu/discuss/topic/840179/?page=1#post-8729080 for help, and Wikipedia for the pseudocode I translated into Scratch code. Done in 102 blocks.