changing from S Corp to C Corp

What happens to the previous year's profits not spent or distributed as K1s when a business transitions from an S Corp to a C Corp (retained in business)? Should those profits be distributed prior to the transition or does it become property of the C Corp?