When input voltage goes negative, C will charge to a negative voltage. There should be at least a large resistance resistor in series with C to keep it from charging to full voltage.
This is not my speciality, so there is no guarantee that this circuit will work even with a large resistance resistor in series with C.