Measurement of the inelastic cross section in proton-lead collisions at sqrt(s_NN) = 5.02 TeV