A sequence of consecutive integers starts at 1 and ends at \( n \). If the sum of these integers is 5050, what is the value of \( n \)? Let's think step by step and output the final answer within \boxed{}.
user