Determination of free-electron parameters of thin films