Can I transfer to a Californian community college THEN transfer to UCBerkeley?

Hi all, sorry for ignoring this post for a while. Thank you all for the honest advices. So yes I did receive an F on transcript and made it up to get 4.0 afterwards. I swear to God I will never do it again.
And yes, I’m an international students studying in another state, and tuition may not be the primary concern. It was a long story but I struggled to make my way to the U.S., so I inevitably made some irrational decision regarding with college choices. It seems that I ended up with in an institution i don’t like that much. That’s the primary reason I wanted to transfer. Moreover, I intended to explore more on fields other than STEM, which my home institution might not be able to do this.
Among all schools I like UCs the best. Not only because the weather, but in terms of academic, I have several friends studying there and I was convinced that this is what I want. Also, I spent a whole summer at a Californian college (just a private college, bare with me that I don’t wanna say more about it :))
With all that being said, this is why I asked this question. So I wonder if I could to go to a CCC for a semester or a year, then transfer to one of the UCs. By far I had taken 40 college credits, among which I think approximately 30 are transferable to UCs. I intended to do a math major, given that I had failed in a CS course. If possible, I would also like to do a dual/minor in social science.
Also, I believe I had some wonderful activities that is really worth to be written in my essay.
Sorry if I had been vague, I think this should be the whole picture of the problem. Thanks for paying attention anyway :slight_smile: