Earl was on the 1 + 5 = <<1+5=6>>6th floor after going up 5 floors.

When he went down 2 floors, he was on the 6 - 2 = <<6-2=4>>4th floor.

Since he went up 7 floors, he was then on the 4 + 7 = <<4+7=11>>11th floor.

Since he is 9 floors away from the top of the building, therefore the building has 11 + 9 = <<11+9=20>>20 floors.

# Answer

20
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Earl started delivering newspapers on the first floor of a condominium building. He then went up 5 floors then went down 2 floors. He again went up 7 floors and found that he is 9 floors away from the top of the building. How many floors does the building have?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
20
Earl started delivering newspapers on the first floor of a condominium building. He then went up 5 floors then went down 2 floors. He again went up 7 floors and found that he is 9 floors away from the top of the building. How many floors does the building have?
train