Imam Malik, may Allah have mercy on him, said: Whoever shaves his head before throwing the pebbles out of ignorance must offer a fidya (compensation).