One end of a ladder 32 feet long is placed 10 feet from the outer wall of a building that stands on the ground level. How far up the building to the nearest foot will the ladder reach?