$n <<= 1 while $n & 0xfff;