This question has a natural upper bound, determined by the preexisting torture/fun distribution in the world. Most people would hold that it's morally acceptable to make the world larger by adding more people whose life outcomes will be drawn from the same probability distribution as the people alive today. If presently the average person has X0 fun, and fraction T0 of people are tortured without you being able to stop it, then you should press the button if X>X0 and N>1/T0.
A lower bound would presumably be the amount of fun the show 24 provides on average, with N being the ratio of the shows' viewers to prisoners rendered so they could be tortured. (Take That, other side!)
Most of the usual thought experiments that justify expected utilitarialism trade off fun for fun, or suffering for suffering. Here's a situation which mixes the two. You are offered to press a button that will select a random person (not you) and torture them for a month. In return the machine will make N people who are not suffering right now have X fun each. The fun will be of the positive variety, not saving any creatures from pain.
1) How large would X and N have to be for you to accept the offer?
2) If you say X or N must be very large, does this prove that you measure torture and fun using in effect different scales, and therefore are a deontologist rather than a utilitarian?