Pigeons, sparrows, and parrots were sitting on a large tree. The number of pigeons was equal to the square root of the sum of the numbers of sparrows and parrots. Then 5 more pigeons arrived, and 2 sparrows and 7 parrots flew away. How many pigeons were there in the end? Write an expression in which x is the final number of sparrows and y is the final number of parrots.
Note that there are several different ways to write an expression, the computer knows the math and can still evaluate it correctly.