Consider a sequence of numbers defined as follows: Start with the number 1 and increase by 1 for each subsequent number, but if the next number is a perfect square, subtract that number instead of adding it. Continue this sequence up to the number 50. What is the sum of the numbers in this sequence? Let's think step by step and output the final answer within \boxed{}.
user