Consider the series \( S \) which is defined as the sum of the squares of the first \( n \) natural numbers. If the sum \( S \) is given by \( S = 1^2 + 2^2 + 3^2 + \ldots + n^2 \) and is known to equal 285, find the value of \( n \). Let's think step by step and output the final answer within \boxed{}.
user