Hi, I'm really having trouble figuring out how to do this question. Could someone please explain to me how it's done?

Question: Sam is standing in the center square of a 9 by 9 grid. She travels outward one square at a time, moving diagonally or along a row or column. How many different paths can Sam follow to the perimeter?

The answer at the back of the book is 320.

Thanks!