This paper studies the dynamic collaboration of a team on a project that progresses gradually over time and generates a payoff upon completion. The main result is that members of a larger team work harder than members of a smaller team if and only if the project is sufficiently far from completion. In contrast, as the project gets close to completion, the aggregate effort of a larger team can become less than that of a smaller team due to aggravated free-riding. This result has three implications in the organization of partnerships and when a manager recruits agents into a team to undertake a project on her behalf. First, given a fixed budget, larger teams are preferable if the project is large. Second, the manager can benefit from dynamically decreasing the team size as the project approaches completion. Third, smaller teams and asymmetric compensation are preferable if the project is small. In addition, this result can explain the empirical findings that teamwork often increases productivity at firms even without complementary skills, mutual monitoring, or non-pecuniary benefits from teamwork as past research has suggested.