The physical and chemical processes that lead to the preferential escape of hydrogen over deuterium in the Martian atmosphere are studied in detail using a one-dimensional photochemical model. Comparison of our theory with recent observations of HDO suggests that, averaged over the planet, Mars contains 0.2 m of crustal water that is exchangeable with the atmosphere. Our estimate is considerably lower than recent estimates of subsurface water on Mars based on geomorphological analysis of Viking images. The estimate can be reconciled if only a small fraction of crustal water can exchange with the atmosphere.