for (int i = 1024; i>0; i /= 2) std::cout << i << std::endl;