A man had to go up a buliding which had five floors and on the fifth floor there was gold and all sorts of riches but there were some problems on the first through fourth floors. The problems were: On the first floor, there was so much sand that he couldn't get through; on the second floor, there were witches who were casting magical spells all day and night so no one could get through; on the third floor, it was as hot as the sun, making it impossible to get through without dying; on the fourth floor, there were mad dogs who would bite everyone they saw.
Given these problems, how did the man get through to the fifth floor alive and safe?