  The neutral atomic hydrogen (HI) mass function (HIMF) describes the
distribution of the HI content of galaxies at any epoch; its evolution provides
an important probe of models of galaxy formation and evolution. Here, we report
Giant Metrewave Radio Telescope HI 21cm spectroscopy of blue star-forming
galaxies at $z\approx0.20-0.42$ in the Extended Groth Strip, which has allowed
us to determine the scaling relation between the average HI mass
($\rm{M_{HI}}$) and the absolute B-band magnitude ($\rm{M_B}$) of such galaxies
at $z \approx 0.35$, by stacking the HI 21cm emission signals of galaxy
subsamples in different $\rm{M_B}$ ranges. We combine this $\rm{M_{HI}-M_B}$
scaling relation (with a scatter assumed to be equal to that in the local
Universe) with the known B-band luminosity function of star-forming galaxies at
these redshifts to determine the HIMF at $z\approx0.35$. We show that the use
of the correct scatter in the $\rm{M_{HI}-M_B}$ scaling relation is critical
for an accurate estimate of the HIMF. We find that the HIMF has evolved
significantly from $z\approx0.35$ to $z\approx0$, i.e. over the last four Gyr,
especially at the high-mass end. High-mass galaxies, with
$\rm{M_{HI}\gtrsim10^{10}\ M_\odot}$, are a factor of $\approx3.4$ less
prevalent at $z\approx0.35$ than at $z \approx 0$. Conversely, there are more
low-mass galaxies, with $\rm{M_{HI} \approx10^9\ {M}_\odot}$, at $z\approx0.35$
than in the local Universe. While our results may be affected by cosmic
variance, we find that massive star-forming galaxies have acquired a
significant amount of HI through merger events or accretion from the
circumgalactic medium over the past four Gyr.
