Performance of the prototype detector for the LHCf experiment