A collective-risk social dilemma arises when a group must cooperate to reach a common target in order to avoid the risk of collective loss while each individual is tempted to free-ride on the contributions of others. In contrast to the prisoners dilemma or public goods games, the collective-risk dilemma encompasses the risk that all individuals lose everything. These characteristics have potential relevance for dangerous climate change and other risky social dilemmas. Cooperation is costly to the individual and it only benefits all individuals if the common target is reached. An individual thus invests without guarantee that the investment is worthwhile for anyone. If there are several subsequent stages of investment, it is not clear when individuals should contribute. For example, they could invest early, thereby signaling their willingness to cooperate in the future, constantly invest their fair share, or wait and compensate missing contributions. To investigate the strategic behavior in such situations, we have simulated the evolutionary dynamics of such collective-risk dilemmas in a finite population. Contributions depend individually on the stage of the game and on the sum of contributions made so far. Every individual takes part in many games and successful behaviors spread in the population. It turns out that constant contributors, such as constant fair sharers, quickly lose out against those who initially do not contribute, but compensate this in later stages of the game. In particular for high risks, such late contributors are favored.