40
The large square is partitioned into 16 smaller squares. If you noticed 16 is a square number, good job, square numbers pop up all over the place here.
16 small squares.
9 2x2 small squares:
4 3x3 small squares
1 large square
2 small squares in the middle of the large square.
8 smaller squares in the offset small squares.
16+9+4+1+2+8=40