Use bit-manipulation solution.