A special sequence starts with 3 and is formed by multiplying each term by 2 to get the next term. If the sum of the first n terms of this sequence is 1023, how many terms are there in this sequence? Let's think step by step and output the final answer within \boxed{}.
user