Consider the sum of the first \( n \) positive integers, denoted by \( S_n \). Find the smallest positive integer \( n \) such that \( S_n \) is a perfect square. Let's think step by step and output the final answer within \boxed{}.
user