Herbert is a game in which you control a robot on an infinite two-dimensional grid. There are three commands available to you:
s: Go one square forward in the current direction.
l: Turn ninety degrees counterclockwise.
r: Turn ninety degrees clockwise.
After playing this game for a while, you wonder how many squares you can reach within a certain number of moves. Write a program to calculate the answer to this question.