Let $X_i$ be a random variable with value 1 when box $i$ is empty and 0 otherwise. Now $P(X_i=1)=(1-\frac{1}{40})^{80}$$P(X_i=1)=(1-\frac{1}{N})^{M}$. And the expected number of empty boxes is just $\mathbb{E}(\sum X_i)=40\mathbb{E}(X_1)\approx \frac{40}{e^2}$$\mathbb{E}(\sum X_i)=N\mathbb{E}(X_1)\approx \frac{N}{e^M}$
EDIT: gave the answer in terms of M,N instead of the numerical values given originally...