# Does the mass affect the speed if friction is 0

A block $$m_1$$ strikes another stationary block $$m_3$$ inelastically . Another block $$m_2$$ is kept on $$m_3$$.Neglect the friction Between all contacting surfaces. Since $$m_2$$ is kept on $$m_3$$ and all the surfaces in contact are smooth and impact between m1 and $$m_3$$ is inelastic ,$$m_1$$ and $$m_3$$ will move together toward right and $$m_2$$ will not move toward right. But at the time of impact $$m_2$$ will also affect speed because to its mass is added ,should I include mass of $$m_2$$ to find final combined speed of $$m_1$$ and $$m_3$$.