The work input to a granular material