So Joseph sold them the grain that had been stored up, and he put the money in the king's treasury.