Mathematicians who overcame academic failure to achieve success Does anyone have any story of mathematicians who overcame "academic failure" or setbacks to achieve success later as a result of their perseverance? This is a soft question, that hopefully can inspire aspiring students.
New edit: I am especially interested in academic failure (e.g. failure of exams, failure in proof/ wrong proof, failure in getting academic jobs).  This is to narrow down the question so it is not too broad. There is another related question on blind/disabled mathematicians which is very good: Who are some blind or otherwise disabled mathematicians who have made important contributions to mathematics?
My ideal accepted answer is a relatively less well known answer (so that we all learn something new), supported by factual evidence (e.g.  a hyperlink to a page or a quote).
Some that I can list are:
1) Zhang Yitang, who worked in Subway (arguably a sort of a setback) but later proved a result related to the Twin Prime Conjecture.
2) Robion Kirby, who failed his oral Ph.D. qualifying examination (http://www-groups.dcs.st-and.ac.uk/history/Biographies/Kirby.html) but later proved the "torus trick".
Thanks! (Hope this question is on topic for Math Stackexchange..)
 A: Andrew Wiles with his Fermat proof is an example of massive struggle. He worked on the topic for 9 years and got demolished when presenting an erroneous proof after 7 years. There were several additional problems, but I forgot the details. You can read about it on Wiki and in much detail in the very accessible "Fermat's Last Theorem" by Simon Singh.
A: John Nash struggled with significant mental health issues when he should have been in the twilight of his mathematical journey. He and his wife spent many difficult years battling with this illness. Slowly, Nash started to get back in touch with the mathematical community in Princeton; engaging with the students, his passion for mathematics never died. It was in his latter years that he was awarded the nobel prize in economics for his contribution to game theory.
A: The analytic number theorist Hua Loo-Keng overcame abject poverty, handicappedness, political persecution; for more information refer to one of his faithful biography.
Charles Hermite overcame much too, but in different aspects; he failed nearly every math exam that he was to take. 
To supplement, the analytic number theorist Chen Jing-Run, the man closest to Goldbach conjecture (who proved "1 + 2") and a student of Hua Loo-Keng, overcame unemployment, poverty, and political persecution; the serial political persecution done unto him was even more violent. But he survived anyway.
A: Srinivasa Ramanujan was such a mathematician. He failed to got admitted to college but he became one of the best mathematician of $20$th century.
Evariste Galois failed to enter to Ecole Polytechnique twice. 
A: Grigori Perelman who possibly proved a generalization of the Poincare Conjecture - the Thurston Geometrization Conjecture  ( has anyone claimed to show any flaw in the proof yet? ). 
That being said, it seems that it's not very uncommon with odd behaviour amongst great mathematicians. They have a huge uphill struggle. Anything they discover could overshine or put others' work in the shadows with all the nasty responsive behaviours which that could provoke in any community. Especially if they are also a political nuisance (like Galois was).
