We show that in the US, the UK, Italy and Sweden women whose first child is a boy are less likely to work in a typical week and work fewer hours than women with first-born girls. The puzzle is why women in these countries react in this way to the sex of their first child, which is chosen randomly by nature. We consider two explanations. As Dahl and Moretti (2008) we show that first-born boys positively affect the probability that a marriage survives, but differently from them and from the literature on developing countries, we show that after a first-born boy the probability that women have more children increases. In these advanced economies the negative impact on fertility deriving from the fact that fewer pregnancies are needed to get a boy is more than compensated by the positive effect on fertility deriving from the greater stability of marriages, which is neglected by studies that focus on married women only.