put the for loop index for p (n) as a int