Einstein not only "did fine" but was extremely precocious. From the wiki entry:
- - -
Einstein excelled at math and physics from a young age, reaching a mathematical level years ahead of his peers. The 12-year-old Einstein taught himself algebra and Euclidean geometry over a single summer.[28] Einstein also independently discovered his own original proof of the Pythagorean theorem aged 12.[29] A family tutor Max Talmud says that after he had given the 12-year-old Einstein a geometry textbook, after a short time "[Einstein] had worked through the whole book. He thereupon devoted himself to higher mathematics... Soon the flight of his mathematical genius was so high I could not follow."[30] His passion for geometry and algebra led the 12-year-old to become convinced that nature could be understood as a "mathematical structure".[30] Einstein started teaching himself calculus at 12, and as a 14-year-old he says he had "mastered integral and differential calculus".[31]
- - -
At age 16, he tried to skip the last two years of gymnasium and directly go to University -- to what is now known as ETH, a fantastically rigorous and selective research university -- but failed the entrance examination. He excelled at the math and physics portions, but of course did not pass in the humanities questions covering material he never studied. This is what caused many myths about him getting kicked out of school, or failing to graduate, etc. In reality, this just means he needed to attend a gymnasium to get the required secondary education in the humanities that he tried to skip.
Starting with university, he did focus on physics, so compared to many theoretical physicists who had the equivalent of a dual math/physics PhD, Einstein's PhD was more physics focused, and for this reason he is not considered as strong of a mathematician as he is a physicist, but this doesn't mean he wasn't good at math, or that he received failing grades, or that he dropped out, etc.