The question seems to be trivial. The header has 32 bytes, 256 gray-scales can be store in a UINT8, which is a byte. So you get a file size of:
1024 * 1024 + 32 = 1'048'608 bytes
I do not see, where your doubts about looking at the header play a role for this question.