The composition of the atmosphere does not change significantly up to 300,000 ft. (56 sm).It consists of approximately 78% nitrogen, 21% oxygen and 1% other gasses. What does change is the pressure of 760mm Hg at sea level, half that at 18000 ft, one quarter at 34000 ft and 1/10 th that at 53000 ft.
There is just as much oxygen at 39000 ft as at sea level, just less pressure.
Hope that helps. Thanks.