This is a fun classic game I used to play on Cool Math Games back in my grade school days. Here is a walkthrough of beating the game.