solution for FrogJump