From the 9th floor, the elevator went down to the 9 - 7 = <<9-7=2>>2nd floor.

Then went up to the 2 + 3 = <<2+3=5>>5th floor.

Then, went up to the 5 + 8 = <<5+8=13>>13th floor; hence there are 13 floors in the building.

# Answer

13
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
An elevator is on the 9th floor. It goes down 7 floors, then up 3  floors, then up 8 floors. If the elevator is on the top floor, how many floors are there in the building?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
13
An elevator is on the 9th floor. It goes down 7 floors, then up 3  floors, then up 8 floors. If the elevator is on the top floor, how many floors are there in the building?
train