PUMaC 2018 Combinatrics B Problem 6

If a and b are selected uniformly from \{0,1, \ldots, 511\} with replacement, the expected number of 1's in the binary representation of a+b can be written in simplest form as \frac{m}{n}. Compute m+n.