Measurements of the nucleon structure function in the range 0.002 < x < 0.17 and 00.2 < Q2 < 8 GeV2 in deuterium, carbon and calcium