You are forgetiing to add the .0 address on the next subnet.
It's easier to use the whole octet (ie 255 not 256) and add 2 (1 per octet). 255 128 64 32 16 8 4 2 1 + 2 = 512
That does NOT give you 512 hosts anyways, it gives you 510 hosts, 1 network and 1 broadcast.
You do know about 2^N formula correct?
2^N = number of addresses including network and broadcast. 2^N-2= number of hosts 2^9-2=510I found writing out the table a couple dozen times commits it to memory quite easily.