The sequence 2, 3, 5, 6, 7, 10, 11, $\ldots$ contains all the positive integers from least to greatest that are neither squares nor cubes. What is the $400^{\mathrm{th}}$ term of the sequence?

Let's think step by step and output the final answer within \boxed{}.
user