add n-pyramid problem