If anybody is interested, my method is:

I looked at the upper left-hand side only.

H

HT

HTA

HTAM

In this part, there are 2^3 paths which produce MATH, because, at every letter we can either go up or right, and there are 3 places where we make the choice.

It's the same for the other 3, so it's 32 total, but, because we counted each straight path twice, we subtract 4 to get the number of possible ways to spell MATH to be 28.