I'm sure Thistle's answer must be right -- but there's a slight error on the order-of-magnitude front in the question...
Apparently Mercury has an eccentric orbit varying between 46 and 70 million km from the sun. 38 km would actually be near the bottom of the sun's "atmosphere".