Number of memory words can be addressed = 256 KW = 2^18.
18 bits to address a word.
Given that when MSB is 111, then the address corresponds to I/O.
Using, 3 bits, 8 combinations are possible.
We give "111" to I/O and "000,001,010,011,100,101,110" to memory address.
So, I/O addresses = 1 * 2^(18-3) = 2^15
Memory addresses = (8-1) * 2^(18-3) = 7 * 2^15