Confined in a box, what is the average distance between a particle hitting a side?

This particle, alone in the box, at a constant velocity $v$, travels in straight lines until hitting a side of the hollow cube, bouncing off in a random direction independent of incident angle (I know it's not momentum conserving, but I'm looking for a statistical average, not a description of a deterministic system).

Let the experiment go on for (essentially) infinite time, and (I assume) the average time between collisions (and so distance) wil converge to a value. What is it?

And what about a hollow sphere?

Edit:
How to begin this confuses me, so I'll consider the simpler scenario of the particle having to hit on an edge of the original square (that is, its velocity had no $z$-component) from its original position $(x_0,y_0)$. Consider each of the 4 edges in turn, by trigonometry deduce the angle between $(x_0,y_0)$ and the vertices ($\theta_1$ and $\theta_2$), and express that edge in polar form: $r(\theta)=\frac{y}{sin(\theta)}$, if $y$ is the shortest distance between $(x_0,y_0)$ and the edge. Integrate $\int_{\theta_1}^{\theta_2}|r(\theta)|d \theta$ to find the sum of the distances, and divide by the edge's length to find the average. My problem is that I think I'm overcomplicating to the extent that when I extend this to 3 dimensions, it won't spit out a meaningful answer: even in the 2-dimensional case there's $ln(\arccos(...)$ in there that makes me think there's a much more elegant solution.

I'm sorry if I'm still being vague, but I've never encountered ways to get around these problems in the first place.

-
Could you show us what you've tried already? People will be more inclined to help if you can pinpoint exactly which concept or aspect of the problem you are stuck on. – Mark Mitchison Dec 12 '12 at 18:19
This question may be more appropriate on Math.SO – Bernhard Dec 12 '12 at 18:34
This is usually answered in the first 50 pages or so of any gas kinetics text book, so it's fundamental to understanding physics... I think it's appropriate here, but it would be nice to see what the confusion is since it is laid out in just about every book on the subject. – tpg2114 Dec 12 '12 at 19:10
en.wikipedia.org/wiki/Kinetic_theory#Collisions_with_container gives an expression (and a link to derivation) for # particles colliding per unit time per unit area. It's just an exercise in dimensional analysis to get it into time-averaged distance per collision. – tpg2114 Dec 14 '12 at 12:08
@Alyosha If you get stuck in that process, feel free to post and I'll see if I can make time to answer it. I'm working on some papers under a deadline which is why I'm not being more helpful. – tpg2114 Dec 14 '12 at 12:13