First of all, what is your definition of intelligence? Smart is a very broad word. It can be a high IQ or a high EQ.
If you say smart is high IQ, then good math doesn't mean high IQ. Iq includes many aspects, including comprehensive analysis ability, memory, calculation ability and so on. If you are good at math, it is difficult to evaluate which IQ is higher. But on the whole, I think people who are good at advanced mathematics (if the scope is wider, including high school mathematics) generally have stronger comprehensive analysis ability; People who are good at math in junior high school may have stronger computing ability. Learning math well is an addition. Even if the memory is not particularly outstanding, it doesn't mean that math is definitely not good.
If by smart you mean high emotional intelligence, then being good at math has nothing to do with being smart. Many mathematicians actually belong to people with mental problems. They may suffer from a mental health disease called scholar syndrome, the most famous of which may be johnf nash, the inventor of non-cooperative game equilibrium.