Text this: Determining the fraction of cosmic-ray protons at ultrahigh energies with cosmogenic neutrinos