Upgrade from Lion to Mountain Lion but not Mavericks
You can purchase OS X Mountain Lion still via Apple online:

Buy OS X Mountain Lion

Once you buy it for $19.99 they will send you an App Store link.