San Marino's history predates the Middle Ages and is analogous to that of other micronations such as Luxembourg, Andorra, Lichtenstein, and Monaco. Because the economy is on pace with Italy's, you should expect very expensive pricing, but you'll be surprised to find that food and transportation are really relatively reasonable.