Calculate the sum n + n/2 + n/4 + n/8 + ....