Ungulates are hoofed mammals that are typically herbivorous and have four legs. Their molariform teeth are adapted for nipping or tearing off and grinding vegetation rather than biting in the manner of carnivores. Most have a four chambered stomach and chew their cud or ruminate. Hastily swallowed food is stored temporarily in the largest compartment, the rumen, the food then passes to the second stomach, the reticulum, where it is shaped into pellets, the cud. While the animal is at rest, the cud is returned to the mouth and slowly chewed to pulp. It then passes through the other two stomachs where digestion begins. This complex process permits an animal to feed quickly, which reduces its exposure to predators in open country, but chew its cud at leisure in the relative safety of a concealed spot.