For m input lines, the decoder can have maximum 2^m output lines.
Output lines notated as n, so n = 2^m.
And each output line uniquely identifying a cell of memory, so n = #memory cells.
memory capacity is given as 1KB, since it is Byte addressable memory, we can bifurcate the capacity as, 1KB = 1K × 1B.
So, we get #cells = 1K = n = 2^m
=> m = log(1024) = 10 (on base 2)
So, we got m & n as,
m=10 & n=1024
m+n=1034.