At a certain time of day, a tree that is x meters tall casts a shadow that is x−49 meters long. If the distance from the top of the tree to the end of the shadow is x+1 meters, what is the height, x, of the tree?