A certain radioactive substance decays such that its quantity halves every 3 days. Initially, there are 1024 grams of the substance. After how many days will there be exactly 1 gram of the substance remaining? Let's think step by step and output the final answer within \boxed{}.
user