I agree with Evan. I would use a variable maybe named position which is initialized to zero and print that value out before the loop.
In the loop, as long as the position hasn't reached 3 or -3, generate a random number to decide whether to add 1 or subtract 1 from the position. then print the new position.
Use our basic algorigthm for finding a max to find the max position and print that value out after the loop.