The diffusion equation is,

$\large \frac{\partial C}{\partial t}= D\nabla^2C$ .

If a limited source of dopants is deposited in a thin layer with a thickness $w$ at the surface such that the dose $Q$ in dopants per square meter is $Q=\int\limits_0^w dz$, the concentration as a function of time

$\large C(z,t)=\frac{Q\exp\left(\frac{-z^2}{4Dt}\right)}{\sqrt{4\pi Dt}}$.

The concentration falls at the surface and the total number of dopants remains constant.