Consider a branching random walk on the real line with a killing barrier at zero: starting from a nonnegative point, particles reproduce and move independently, but are killed when they touch the negative half-line. The population of the killed branching random walk dies out almost surely in both critical and subcritical cases, where by subcritical case we mean that the rightmost particle of the branching random walk without killing has a negative speed and by critical case when this speed is zero. We investigate the total progeny of the killed branching random walk and give its precise tail distribution both in the critical and subcritical cases, which solves an open problem of D. Aldous [4]