How the experience of living in prison affect Edmond Dantès in “The Count of Monte Cristo

How did the experience of living in prison affect Edmond Dantès in “The Count of Monte Cristo?”