Stellar formation

A forming protostar remains surrounded by gas that is falling inward. What happens to its mass if some of this gas is accreted?