Ans is 24.
First understand following operation on bits
n & 1 returns true when last bit of n is 1 or say when s is odd. Therefore !(n&1) returns true when n is even or last bit of n is 0.
n= n >>1, shifts the bits of n rightwards by 1 position. It is equivalent to n = n/2
Now $2^{24}$ means 1 followed by 24 zeros in binary.
As loop executes n will keep shifting rightwards..
$2^{24}$ -> $2^{23}$ -> $2^{22}$ ->... -> $2^{1}$
Therefore 24 times.