I think you should initialize to zero - when even the first level fails, it should report zero pyramid levels.