In case the embassy or consulate provides the visa, the person is then permitted to go to the U.S.. If you've got an Italy visa you're not required to acquire a particular visa for San Marino or Vatican. If you've got to stay immediately, then you've got to acquire a normal visa, since hotel accommodation is just available beyond the airport.