Do you want a good marriage? Start by doing some math.