Math Puzzle!

Take the digits 5, 4, 3, 2 and 1, in that order. Using those digits and the four arithmetic signs — plus, minus, times and divided by — you can get 1 with the sequence 5 – 4 + 3 – 2 – 1. You can get 2 with the sequence (5 – 4 + 3 – 2) x 1.

The question is … how many numbers from 1 to 40 can you get using the digits 5, 4, 3, 2, and 1 in that order along with the four arithmetic signs?

You can group digits with parentheses, as in the example. There are no tricks to this, though. It’s a straightforward puzzle. How many numbers from 1 to 40 can you get — and, specifically, what number or numbers can you not get?