you need to check with the airline. most of the time the airline will give you hotel accommodation, if the transit is more than 6 hrs, which means you will be able to enter the country free.