At a picnic there werecchildren,fadult females, andmadult males, where 2<c<f<m. Each person shook hands with every other person. The sum of the number of handshakes among children, the number of handshakes among adult females, and the number of handshakes among adult males is 57. How many handshakes were there altogether?