Complex sentence: Matveyevich was not a very educated man, he had only attended four years of school but he knew how to read and write.
Split into simpler sentences: Matveyevich was not a very educated man. He had only attended four years of school but knew how to read and write.